From: George Spelvin <lkml@SDF.ORG>
To: Benjamin Block <bblock@linux.ibm.com>,
Steffen Maier <maier@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org,
lkml@sdf.org
Subject: Re: [RFC PATCH v1 27/50] drivers/s390/scsi/zcsp_fc.c: Use prandom_u32_max() for backoff
Date: Tue, 31 Mar 2020 19:04:48 +0000 [thread overview]
Message-ID: <20200331190448.GB9912@SDF.ORG> (raw)
In-Reply-To: <20200331161321.GB17507@t480-pf1aa2c2>
On Tue, Mar 31, 2020 at 06:13:21PM +0200, Benjamin Block wrote:
> it would be nice, if you could address the mails to the
> driver-maintainers (`scripts/get_maintainer.pl drivers/s390/scsi/zfcp_fc.c`
> will tell you that this is me and Steffen); I'd certainly have noticed
> it earlier then :-).
How the $%$# did I mess that up? I know choosing recipients for
this series was mostly manual, becase it didn't fit the usual
pattern of the entire series going to everyone affectrd by any part
of it.
And then there waqs a whole lot of shuffling things into a logical
order and grouping.
But I checked MAINTAINERS originally, I really did. :-(
> On Fri, Nov 29, 2019 at 03:39:41PM -0500, George Spelvin wrote:
>> diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
>> index b018b61bd168e..d24cafe02708f 100644
>> --- a/drivers/s390/scsi/zfcp_fc.c
>> +++ b/drivers/s390/scsi/zfcp_fc.c
>> @@ -48,7 +48,7 @@ unsigned int zfcp_fc_port_scan_backoff(void)
>> {
>> if (!port_scan_backoff)
>> return 0;
>> - return get_random_int() % port_scan_backoff;
>> + return prandom_u32_max(port_scan_backoff);
>
> I think the change is fine. You are right, we don't need a crypto nonce
> here.
>
> I think I'd let the zero-check stand as is, because the internal
> behaviour of prandom_u32_max() is, as you say, undocumented. This is not
> a performance critical code-path for us anyway.
I agree. Sorry, that comment in the commit message was a bit of
a "not to self" that I didn't clean up. Feel free to rm it when
queueing if you like.
> Steffen, do you have any objections? Otherwise I can queue this up -
> minus the somewhat mangled subject - for when we send something next time.
Thank you, I'll put it in my "accepted" pile.
prev parent reply other threads:[~2020-03-31 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 20:39 [RFC PATCH v1 27/50] drivers/s390/scsi/zcsp_fc.c: Use prandom_u32_max() for backoff George Spelvin
2020-03-31 16:13 ` Benjamin Block
2020-03-31 16:23 ` Steffen Maier
2020-03-31 19:04 ` George Spelvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200331190448.GB9912@SDF.ORG \
--to=lkml@sdf.org \
--cc=bblock@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=maier@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox