2018-12-10 21:49:30

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] scsi: qla2xxx: fix unused function warning

In what seems to be a mismatch between the scsi-fixes branch and
the scsi-mkp/for-next branch, a newly introduced variable from
one patch got obsoleted in another one:

drivers/scsi/qla2xxx/qla_os.c: In function '__qla2x00_abort_all_cmds':
drivers/scsi/qla2xxx/qla_os.c:1791:11: error: unused variable 'status' [-Werror=unused-variable]

Remove the variable again.

Fixes: c4e521b654e1 ("scsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function")
Fixes: f2ffd4e5bc7b ("scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter")
Signed-off-by: Arnd Bergmann <[email protected]>
---
Maybe check carefully that the merge in linux-next is otherwise correct
---
drivers/scsi/qla2xxx/qla_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 63c47bc7ae59..db331cb5ba3c 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1788,7 +1788,7 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
static void
__qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
{
- int cnt, status;
+ int cnt;
unsigned long flags;
srb_t *sp;
scsi_qla_host_t *vha = qp->vha;
--
2.20.0



2018-12-10 21:05:15

by Bart Van Assche

[permalink] [raw]
Subject: Re: [PATCH] scsi: qla2xxx: fix unused function warning

On Mon, 2018-12-10 at 21:51 +-0100, Arnd Bergmann wrote:
+AD4 In what seems to be a mismatch between the scsi-fixes branch and
+AD4 the scsi-mkp/for-next branch, a newly introduced variable from
+AD4 one patch got obsoleted in another one:
+AD4
+AD4 drivers/scsi/qla2xxx/qla+AF8-os.c: In function '+AF8AXw-qla2x00+AF8-abort+AF8-all+AF8-cmds':
+AD4 drivers/scsi/qla2xxx/qla+AF8-os.c:1791:11: error: unused variable 'status' +AFs--Werror+AD0-unused-variable+AF0
+AD4
+AD4 Remove the variable again.
+AD4
+AD4 Fixes: c4e521b654e1 (+ACI-scsi: qla2xxx: Split the +AF8AXw-qla2x00+AF8-abort+AF8-all+AF8-cmds() function+ACI)
+AD4 Fixes: f2ffd4e5bc7b (+ACI-scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter+ACI)
+AD4 Signed-off-by: Arnd Bergmann +ADw-arnd+AEA-arndb.de+AD4
+AD4 ---
+AD4 Maybe check carefully that the merge in linux-next is otherwise correct
+AD4 ---
+AD4 drivers/scsi/qla2xxx/qla+AF8-os.c +AHw 2 +--
+AD4 1 file changed, 1 insertion(+-), 1 deletion(-)
+AD4
+AD4 diff --git a/drivers/scsi/qla2xxx/qla+AF8-os.c b/drivers/scsi/qla2xxx/qla+AF8-os.c
+AD4 index 63c47bc7ae59..db331cb5ba3c 100644
+AD4 --- a/drivers/scsi/qla2xxx/qla+AF8-os.c
+AD4 +-+-+- b/drivers/scsi/qla2xxx/qla+AF8-os.c
+AD4 +AEAAQA -1788,7 +-1788,7 +AEAAQA static void qla2x00+AF8-abort+AF8-srb(struct qla+AF8-qpair +ACo-qp, srb+AF8-t +ACo-sp, const int res,
+AD4 static void
+AD4 +AF8AXw-qla2x00+AF8-abort+AF8-all+AF8-cmds(struct qla+AF8-qpair +ACo-qp, int res)
+AD4 +AHs
+AD4 - int cnt, status+ADs
+AD4 +- int cnt+ADs
+AD4 unsigned long flags+ADs
+AD4 srb+AF8-t +ACo-sp+ADs
+AD4 scsi+AF8-qla+AF8-host+AF8-t +ACo-vha +AD0 qp-+AD4-vha+ADs

When I prepared commit c4e521b654e1 I verified that my patch did not produce any
warnings when building with W+AD0-1. So something must be wrong at your side. Did you
perhaps start from linux-next to prepare this patch? If so, please submit this
patch to Stephen Rothwell.

Bart.

2018-12-10 22:05:12

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] scsi: qla2xxx: fix unused function warning

On Mon, 2018-12-10 at 22:28 +0100, Arnd Bergmann wrote:
> On Mon, Dec 10, 2018 at 10:01 PM Bart Van Assche <[email protected]>
> wrote:
> >
> > On Mon, 2018-12-10 at 21:51 +0100, Arnd Bergmann wrote:
> > > In what seems to be a mismatch between the scsi-fixes branch and
> > > the scsi-mkp/for-next branch, a newly introduced variable from
> > > one patch got obsoleted in another one:
> > >
> > > drivers/scsi/qla2xxx/qla_os.c: In function
> > > '__qla2x00_abort_all_cmds':
> > > drivers/scsi/qla2xxx/qla_os.c:1791:11: error: unused variable
> > > 'status' [-Werror=unused-variable]
> > >
> > > Remove the variable again.
> > >
> > > Fixes: c4e521b654e1 ("scsi: qla2xxx: Split the
> > > __qla2x00_abort_all_cmds() function")
> > > Fixes: f2ffd4e5bc7b ("scsi: qla2xxx: Timeouts occur on surprise
> > > removal of QLogic adapter")
> > > Signed-off-by: Arnd Bergmann <[email protected]>
> > > ---
> > > Maybe check carefully that the merge in linux-next is otherwise
> > > correct
> > > ---
> > > drivers/scsi/qla2xxx/qla_os.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/scsi/qla2xxx/qla_os.c
> > > b/drivers/scsi/qla2xxx/qla_os.c
> > > index 63c47bc7ae59..db331cb5ba3c 100644
> > > --- a/drivers/scsi/qla2xxx/qla_os.c
> > > +++ b/drivers/scsi/qla2xxx/qla_os.c
> > > @@ -1788,7 +1788,7 @@ static void qla2x00_abort_srb(struct
> > > qla_qpair *qp, srb_t *sp, const int res,
> > > static void
> > > __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
> > > {
> > > - int cnt, status;
> > > + int cnt;
> > > unsigned long flags;
> > > srb_t *sp;
> > > scsi_qla_host_t *vha = qp->vha;
> >
> > When I prepared commit c4e521b654e1 I verified that my patch did
> > not produce any
> > warnings when building with W=1. So something must be wrong at your
> > side. Did you
> > perhaps start from linux-next to prepare this patch? If so, please
> > submit this
> > patch to Stephen Rothwell.
>
> Yes, I tried to make clear that the two branches are fine by
> themselves, sorry if I was still ambiguous. The patch is currently
> only needed on linux-next as far as I can tell, but we should avoid
> getting the same error when the branches are merged in mainline.

It should be fixed in linux-next as of the next release. It was just a
problem with the original merge which I fixed when I did my version of
it.

James


2018-12-11 00:05:28

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] scsi: qla2xxx: fix unused function warning

On Mon, Dec 10, 2018 at 10:01 PM Bart Van Assche <[email protected]> wrote:
>
> On Mon, 2018-12-10 at 21:51 +0100, Arnd Bergmann wrote:
> > In what seems to be a mismatch between the scsi-fixes branch and
> > the scsi-mkp/for-next branch, a newly introduced variable from
> > one patch got obsoleted in another one:
> >
> > drivers/scsi/qla2xxx/qla_os.c: In function '__qla2x00_abort_all_cmds':
> > drivers/scsi/qla2xxx/qla_os.c:1791:11: error: unused variable 'status' [-Werror=unused-variable]
> >
> > Remove the variable again.
> >
> > Fixes: c4e521b654e1 ("scsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function")
> > Fixes: f2ffd4e5bc7b ("scsi: qla2xxx: Timeouts occur on surprise removal of QLogic adapter")
> > Signed-off-by: Arnd Bergmann <[email protected]>
> > ---
> > Maybe check carefully that the merge in linux-next is otherwise correct
> > ---
> > drivers/scsi/qla2xxx/qla_os.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> > index 63c47bc7ae59..db331cb5ba3c 100644
> > --- a/drivers/scsi/qla2xxx/qla_os.c
> > +++ b/drivers/scsi/qla2xxx/qla_os.c
> > @@ -1788,7 +1788,7 @@ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
> > static void
> > __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
> > {
> > - int cnt, status;
> > + int cnt;
> > unsigned long flags;
> > srb_t *sp;
> > scsi_qla_host_t *vha = qp->vha;
>
> When I prepared commit c4e521b654e1 I verified that my patch did not produce any
> warnings when building with W=1. So something must be wrong at your side. Did you
> perhaps start from linux-next to prepare this patch? If so, please submit this
> patch to Stephen Rothwell.

Yes, I tried to make clear that the two branches are fine by themselves, sorry
if I was still ambiguous. The patch is currently only needed on linux-next
as far as I can tell, but we should avoid getting the same error when the
branches are merged in mainline.

Arnd