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>] [day] [month] [year] [list]
Message-id: <1130498471.248131435231903435.JavaMail.weblogic@ep2mlwas07c>
Date:	Thu, 25 Jun 2015 11:31:46 +0000 (GMT)
From:	Maninder Singh <maninder1.s@...sung.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	"abbotti@....co.uk" <abbotti@....co.uk>,
	"hsweeten@...ionengravers.com" <hsweeten@...ionengravers.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	PANKAJ MISHRA <pankaj.m@...sung.com>
Subject: Re: [PATCH 1/1] staging/comedi: remove unnecessary check around
 pci_dev_put

Hi,

>This patch is correct but the motivation is wrong.
>
>The check in pci_dev_put() is like a sanity check.  There are many
>functions which have a sanity check and many which do not, it is
>impossible for a human to remember the complete list of each.  When we
>remove explicit checks for NULL and instead rely on the sanity checks
>it sometimes makes the code more subtle and difficult to read.
>
>In this case, "pcidev" can never be NULL so the check is misleading and
>makes the code more complicated.  Removing it is a good thing.  Also
>the attach function does not have a NULL check so when we remove this
>check we make the code more consistent.
>
>But in other cases, if "pcidev" could be NULL then we should keep the
>check so that the code is easier to read.

Yes agree, I also sent this patch because there is only one call for pci_dev_put
in adl_pci9118.c, and i thoguht its good to remove check around that one.

Thanks for your feedback.
------------

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ