lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 15 Feb 2024 18:20:15 +0100
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Raag Jadav <raag.jadav@...el.com>, jarkko.nikula@...ux.intel.com, 
	mika.westerberg@...ux.intel.com, lakshmi.sowjanya.d@...el.com, linux-pwm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/5] pwm: dwc: drop redundant error check

Hello Andy,

On Thu, Feb 15, 2024 at 03:36:12PM +0200, Andy Shevchenko wrote:
> On Thu, Feb 15, 2024 at 10:22:57AM +0100, Uwe Kleine-König wrote:
> > If a driver author knows it while writing the code, it's obvious. But if
> > the driver author looks again in 2 years or someone else (e.g. me with
> > the PWM maintainer hat on and with little pci experience) that knowledge
> > might be faded.
> 
> This is widely used pattern. Anybody who works with Git should know how
> to use `git grep` tool. If in doubts, always can ask in the mailing lists.

IMHO you're assuming to much. If someone sees this pattern and quickly
looks at the implementation of pcim_iomap_table() they might (as I did)
conclude that this call should be error checked. If they send a patch in
say 2 years I think I won't remember this discussion/patch and happily
accept this patch. And I probably won't get enough doubts to start
grepping around.

> I still consider it redundant.
> 
> P.S. That's what you call "bikeshedding" (done by yourself here)?

I can understand that you consider that bikeshedding given that for you
it's obvious that the second function cannot fail. For me it's not and I
take this as a hint that it's not obvious for everyone.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ