2021-01-25 04:14:53

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the scsi-mkp tree

Hi all,

After merging the scsi-mkp tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
drivers/scsi/sg.c:2908:4: error: expected '}' before 'else'
2908 | else
| ^~~~
drivers/scsi/sg.c:2902:16: warning: unused variable 'cptp' [-Wunused-variable]
2902 | const char *cptp = "pack_id=";
| ^~~~
drivers/scsi/sg.c:2896:5: error: label 'good' used but not defined
2896 | goto good;
| ^~~~
drivers/scsi/sg.c: At top level:
drivers/scsi/sg.c:2913:2: error: expected identifier or '(' before 'return'
2913 | return NULL;
| ^~~~~~
drivers/scsi/sg.c:2914:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
2914 | good:
| ^
drivers/scsi/sg.c:2917:2: error: expected identifier or '(' before 'return'
2917 | return srp;
| ^~~~~~
drivers/scsi/sg.c:2918:1: error: expected identifier or '(' before '}' token
2918 | }
| ^
drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
drivers/scsi/sg.c:2912:2: error: control reaches end of non-void function [-Werror=return-type]
2912 | }
| ^

Caused by commit

7323ad3618b6 ("scsi: sg: Replace rq array with xarray")

SG_LOG() degenerates to "{}" in some configs ...

I have used the scsi-mkp tree from next-20210122 for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-25 05:56:37

by Douglas Gilbert

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree

On 2021-01-24 11:13 p.m., Stephen Rothwell wrote:
> Hi all,
>
> After merging the scsi-mkp tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
> drivers/scsi/sg.c:2908:4: error: expected '}' before 'else'
> 2908 | else
> | ^~~~
> drivers/scsi/sg.c:2902:16: warning: unused variable 'cptp' [-Wunused-variable]
> 2902 | const char *cptp = "pack_id=";
> | ^~~~
> drivers/scsi/sg.c:2896:5: error: label 'good' used but not defined
> 2896 | goto good;
> | ^~~~
> drivers/scsi/sg.c: At top level:
> drivers/scsi/sg.c:2913:2: error: expected identifier or '(' before 'return'
> 2913 | return NULL;
> | ^~~~~~
> drivers/scsi/sg.c:2914:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
> 2914 | good:
> | ^
> drivers/scsi/sg.c:2917:2: error: expected identifier or '(' before 'return'
> 2917 | return srp;
> | ^~~~~~
> drivers/scsi/sg.c:2918:1: error: expected identifier or '(' before '}' token
> 2918 | }
> | ^
> drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
> drivers/scsi/sg.c:2912:2: error: control reaches end of non-void function [-Werror=return-type]
> 2912 | }
> | ^
>
> Caused by commit
>
> 7323ad3618b6 ("scsi: sg: Replace rq array with xarray")
>
> SG_LOG() degenerates to "{}" in some configs ...
>
> I have used the scsi-mkp tree from next-20210122 for today.
>

Hi,
I sent a new patchset to the linux-scsi list about 4 hours ago to
fix that.

Doug Gilbert

2021-01-27 21:31:19

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree

Hi all,

On Mon, 25 Jan 2021 00:53:59 -0500 Douglas Gilbert <[email protected]> wrote:
>
> On 2021-01-24 11:13 p.m., Stephen Rothwell wrote:
> >
> > After merging the scsi-mkp tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
> > drivers/scsi/sg.c:2908:4: error: expected '}' before 'else'
> > 2908 | else
> > | ^~~~
> > drivers/scsi/sg.c:2902:16: warning: unused variable 'cptp' [-Wunused-variable]
> > 2902 | const char *cptp = "pack_id=";
> > | ^~~~
> > drivers/scsi/sg.c:2896:5: error: label 'good' used but not defined
> > 2896 | goto good;
> > | ^~~~
> > drivers/scsi/sg.c: At top level:
> > drivers/scsi/sg.c:2913:2: error: expected identifier or '(' before 'return'
> > 2913 | return NULL;
> > | ^~~~~~
> > drivers/scsi/sg.c:2914:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
> > 2914 | good:
> > | ^
> > drivers/scsi/sg.c:2917:2: error: expected identifier or '(' before 'return'
> > 2917 | return srp;
> > | ^~~~~~
> > drivers/scsi/sg.c:2918:1: error: expected identifier or '(' before '}' token
> > 2918 | }
> > | ^
> > drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
> > drivers/scsi/sg.c:2912:2: error: control reaches end of non-void function [-Werror=return-type]
> > 2912 | }
> > | ^
> >
> > Caused by commit
> >
> > 7323ad3618b6 ("scsi: sg: Replace rq array with xarray")
> >
> > SG_LOG() degenerates to "{}" in some configs ...
> >
> > I have used the scsi-mkp tree from next-20210122 for today.
>
> I sent a new patchset to the linux-scsi list about 4 hours ago to
> fix that.
>
> Doug Gilbert

I am still getting this build failure.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-28 00:07:44

by Douglas Gilbert

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree

On 2021-01-27 2:01 a.m., Stephen Rothwell wrote:
> Hi all,
>
> On Mon, 25 Jan 2021 00:53:59 -0500 Douglas Gilbert <[email protected]> wrote:
>>
>> On 2021-01-24 11:13 p.m., Stephen Rothwell wrote:
>>>
>>> After merging the scsi-mkp tree, today's linux-next build (powerpc
>>> ppc64_defconfig) failed like this:
>>>
>>> drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
>>> drivers/scsi/sg.c:2908:4: error: expected '}' before 'else'
>>> 2908 | else
>>> | ^~~~
>>> drivers/scsi/sg.c:2902:16: warning: unused variable 'cptp' [-Wunused-variable]
>>> 2902 | const char *cptp = "pack_id=";
>>> | ^~~~
>>> drivers/scsi/sg.c:2896:5: error: label 'good' used but not defined
>>> 2896 | goto good;
>>> | ^~~~
>>> drivers/scsi/sg.c: At top level:
>>> drivers/scsi/sg.c:2913:2: error: expected identifier or '(' before 'return'
>>> 2913 | return NULL;
>>> | ^~~~~~
>>> drivers/scsi/sg.c:2914:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
>>> 2914 | good:
>>> | ^
>>> drivers/scsi/sg.c:2917:2: error: expected identifier or '(' before 'return'
>>> 2917 | return srp;
>>> | ^~~~~~
>>> drivers/scsi/sg.c:2918:1: error: expected identifier or '(' before '}' token
>>> 2918 | }
>>> | ^
>>> drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
>>> drivers/scsi/sg.c:2912:2: error: control reaches end of non-void function [-Werror=return-type]
>>> 2912 | }
>>> | ^
>>>
>>> Caused by commit
>>>
>>> 7323ad3618b6 ("scsi: sg: Replace rq array with xarray")
>>>
>>> SG_LOG() degenerates to "{}" in some configs ...
>>>
>>> I have used the scsi-mkp tree from next-20210122 for today.
>>
>> I sent a new patchset to the linux-scsi list about 4 hours ago to
>> fix that.
>>
>> Doug Gilbert
>
> I am still getting this build failure.

Hi,
I resent the original patch set, with fixes, against the linux-scsi
list yesterday but that was not the form that Martin Petersen needs
it in. That was against his 5.12/scsi-queue branch which is roughly
lk 5.11.0-rc2. He has referred me to his 5.12/scsi-staging branch
which looks half applied from the 45 patch set that I have been
sending to the linux-scsi list. Trying to find out if that was the
intention or a mistake.

The other issue is a large patchset that removes the first function
argument from blk_execute_rq_nowait() which is used by the sg driver.

Doug Gilbert


2021-03-12 03:22:33

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the scsi-mkp tree

On 3/11/21 8:17 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the scsi-mkp tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
>
> drivers/scsi/sg.c: In function 'sg_mk_kern_bio':
> drivers/scsi/sg.c:2958:17: error: 'BIO_MAX_PAGES' undeclared (first use in this function); did you mean 'BIO_MAX_VECS'?
> 2958 | if (bvec_cnt > BIO_MAX_PAGES)
> | ^~~~~~~~~~~~~
> | BIO_MAX_VECS
>
> Caused by commit
>
> b32ac463cb59 ("scsi: sg: NO_DXFER move to/from kernel buffers")
>
> interacting with commit
>
> a8affc03a9b3 ("block: rename BIO_MAX_PAGES to BIO_MAX_VECS")
>
> from the block tree.
>
> I have applied the following merge fix patch:
>
> From: Stephen Rothwell <[email protected]>
> Date: Fri, 12 Mar 2021 14:11:16 +1100
> Subject: [PATCH] scsi: sg: fix up for BIO_MAX_PAGES rename
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/scsi/sg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index 2d4bbc1a1727..6b31b2bc8f9a 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -2955,7 +2955,7 @@ sg_mk_kern_bio(int bvec_cnt)
> {
> struct bio *biop;
>
> - if (bvec_cnt > BIO_MAX_PAGES)
> + if (bvec_cnt > BIO_MAX_VECS)
> return NULL;
> biop = bio_alloc(GFP_ATOMIC, bvec_cnt);
> if (!biop)

Looks good - fwiw, the block change will go into 5.12-rc3 to avoid
having this issue over a merge window prep, so maybe SCSI can pull
in -rc3 and get this resolved locally in that tree.

I'll rebase the block-5.12 branch off -rc1 after this merge.

--
Jens Axboe