linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: osd_uld: fix mismerge
@ 2017-04-19 17:44 Arnd Bergmann
  2017-04-19 17:46 ` Bart Van Assche
  2017-04-19 23:26 ` Stephen Rothwell
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-04-19 17:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Arnd Bergmann, Boaz Harrosh, Benny Halevy, James E.J. Bottomley,
	Martin K. Petersen, Dan Carpenter, Bart Van Assche, linux-scsi,
	linux-kernel

A mismerge between two branches in linux-next reintroduced a warning that was
previously resolved:

drivers/scsi/osd/osd_uld.c: In function 'osd_probe':
drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Werror=unused-result]

The original fix had more complex error unrolling, but as far as I
can tell, this simpler version is now sufficient.

Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/scsi/osd/osd_uld.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index 8b9941a5687a..0e56f1eb05dc 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -454,7 +454,8 @@ static int osd_probe(struct device *dev)
 	/* hold one more reference to the scsi_device that will get released
 	 * in __release, in case a logout is happening while fs is mounted
 	 */
-	scsi_device_get(scsi_device);
+	if (scsi_device_get(scsi_device))
+		goto err_retract_minor;
 	osd_dev_init(&oud->od, scsi_device);
 
 	/* allocate a disk and set it up */
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: osd_uld: fix mismerge
  2017-04-19 17:44 [PATCH] scsi: osd_uld: fix mismerge Arnd Bergmann
@ 2017-04-19 17:46 ` Bart Van Assche
  2017-04-19 23:29   ` Stephen Rothwell
  2017-04-19 23:26 ` Stephen Rothwell
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2017-04-19 17:46 UTC (permalink / raw)
  To: sfr, arnd
  Cc: jejb, linux-scsi, ooo, dan.carpenter, linux-kernel, bhalevy,
	martin.petersen

On Wed, 2017-04-19 at 19:44 +0200, Arnd Bergmann wrote:
> Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
> Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")

Hello Arnd,

Both these patches are fine as far as I can tell. Shouldn't the
"Fixes" tag refer to the merge commit instead of to the commits
that have been merged?

Bart.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: osd_uld: fix mismerge
  2017-04-19 17:44 [PATCH] scsi: osd_uld: fix mismerge Arnd Bergmann
  2017-04-19 17:46 ` Bart Van Assche
@ 2017-04-19 23:26 ` Stephen Rothwell
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2017-04-19 23:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Boaz Harrosh, Benny Halevy, James E.J. Bottomley,
	Martin K. Petersen, Dan Carpenter, Bart Van Assche, linux-scsi,
	LKML, Greg KH, Linux-Next Mailing List

Hi Arnd,

On Wed, 19 Apr 2017 19:44:01 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
>
> A mismerge between two branches in linux-next reintroduced a warning that was
> previously resolved:
> 
> drivers/scsi/osd/osd_uld.c: In function 'osd_probe':
> drivers/scsi/osd/osd_uld.c:457:2: error: ignoring return value of 'scsi_device_get', declared with attribute warn_unused_result [-Werror=unused-result]
> 
> The original fix had more complex error unrolling, but as far as I
> can tell, this simpler version is now sufficient.
> 
> Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
> Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/scsi/osd/osd_uld.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
> index 8b9941a5687a..0e56f1eb05dc 100644
> --- a/drivers/scsi/osd/osd_uld.c
> +++ b/drivers/scsi/osd/osd_uld.c
> @@ -454,7 +454,8 @@ static int osd_probe(struct device *dev)
>  	/* hold one more reference to the scsi_device that will get released
>  	 * in __release, in case a logout is happening while fs is mounted
>  	 */
> -	scsi_device_get(scsi_device);
> +	if (scsi_device_get(scsi_device))
> +		goto err_retract_minor;
>  	osd_dev_init(&oud->od, scsi_device);
>  
>  	/* allocate a disk and set it up */

I will add this as a merge fix patch for the merge of the char-misc and
scsi trees today.  Someone needs to let Linus know when these trees are
merged.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scsi: osd_uld: fix mismerge
  2017-04-19 17:46 ` Bart Van Assche
@ 2017-04-19 23:29   ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2017-04-19 23:29 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: arnd, jejb, linux-scsi, ooo, dan.carpenter, linux-kernel,
	bhalevy, martin.petersen, Greg KH, Linux-Next Mailing List

Hi Bart,

On Wed, 19 Apr 2017 17:46:43 +0000 Bart Van Assche <Bart.VanAssche@sandisk.com> wrote:
>
> On Wed, 2017-04-19 at 19:44 +0200, Arnd Bergmann wrote:
> > Fixes: c02465fa13b6 ("scsi: osd_uld: Check scsi_device_get() return value")
> > Fixes: ac1ddc584e98 ("scsi: utilize new cdev_device_add helper function")  
> 
> Both these patches are fine as far as I can tell. Shouldn't the
> "Fixes" tag refer to the merge commit instead of to the commits
> that have been merged?

Unfortunately, the merge commit is redone every day and will be redone
by Linus during the merge window.  This fix should be incorporated into
the merge commit itself.  I should have done it originally, but the
conflict was such a mess that I took the easy way out :-)
-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-19 23:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 17:44 [PATCH] scsi: osd_uld: fix mismerge Arnd Bergmann
2017-04-19 17:46 ` Bart Van Assche
2017-04-19 23:29   ` Stephen Rothwell
2017-04-19 23:26 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).