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] [day] [month] [year] [list]
Message-ID: <20150317140608.GA5084@sudip-PC>
Date:	Tue, 17 Mar 2015 19:36:34 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Benjamin Romer <benjamin.romer@...sys.com>,
	David Kershner <david.kershner@...sys.com>,
	sparmaintainer@...sys.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: unisys: remove unused variables

On Mon, Mar 16, 2015 at 04:34:58PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Mar 12, 2015 at 07:44:20PM +0530, Sudip Mukherjee wrote:
> > these variable were being assigned some values but never reused.
> > 
> > Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> > ---
> >  drivers/staging/unisys/virthba/virthba.c | 18 ++++++------------
> >  drivers/staging/unisys/virtpci/virtpci.c | 22 +++++++---------------
> >  2 files changed, 13 insertions(+), 27 deletions(-)
> > 
> > diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
> > index e5b0dd8..655db2f 100644
> > --- a/drivers/staging/unisys/virthba/virthba.c
> > +++ b/drivers/staging/unisys/virthba/virthba.c
> > @@ -333,16 +333,14 @@ static inline void
> >  send_disk_add_remove(struct diskaddremove *dar)
> >  {
> >  	struct scsi_device *sdev;
> > -	int error;
> >  
> >  	sdev = scsi_device_lookup(dar->shost, dar->channel, dar->id, dar->lun);
> >  	if (sdev) {
> >  		if (!(dar->add))
> >  			scsi_remove_device(sdev);
> >  	} else if (dar->add) {
> > -		error =
> > -		    scsi_add_device(dar->shost, dar->channel, dar->id,
> > -				    dar->lun);
> > +		scsi_add_device(dar->shost, dar->channel, dar->id,
> > +				dar->lun);
> 
> This should be properly checked, not ignored.
i have a total newbie question on this one and I am hoping to get
some pointer or some advise on it.
this send_disk_add_remove() is being called from
do_disk_add_remove() which is a function called from a workqueue.
so how do i return error codes fom here?

regards
sudip 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ