From: Stefano Brivio <sbrivio@redhat.com>
To: Gokce Kuler <gokcekuler@gmail.com>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org
Subject: Re: [Outreachy kernel] [PATCH] staging: hp100: line over 80 characters
Date: Mon, 23 Mar 2020 01:49:59 +0100 [thread overview]
Message-ID: <20200323014959.3267920c@elisabeth> (raw)
In-Reply-To: <20200322014137.GA6031@siyah2>
On Sun, 22 Mar 2020 04:41:37 +0300
Gokce Kuler <gokcekuler@gmail.com> wrote:
> Moved to the bottom line after == operator for it exceeds 80 character
>
> Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> ---
> drivers/staging/hp/hp100.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
> index 1b957aa..43607fb 100644
> --- a/drivers/staging/hp/hp100.c
> +++ b/drivers/staging/hp/hp100.c
> @@ -549,7 +549,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus,
> #endif
> local_mode = 3;
> } else if (chip == HP100_CHIPID_LASSEN &&
> - (lsw & (HP100_BM_WRITE | HP100_BM_READ)) == (HP100_BM_WRITE | HP100_BM_READ)) {
> + (lsw & (HP100_BM_WRITE | HP100_BM_READ)) ==
> + (HP100_BM_WRITE | HP100_BM_READ)) {
There's another way to fix this:
a & (x | y) == x | y <=> a & x && a & y
it should be more readable this way, as it's then immediately clear
that those and only those bits need to be set.
--
Stefano
next prev parent reply other threads:[~2020-03-23 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 1:41 [PATCH] staging: hp100: line over 80 characters Gokce Kuler
2020-03-22 11:24 ` [Outreachy kernel] " Greg KH
2020-03-23 0:49 ` Stefano Brivio [this message]
2020-03-23 7:15 ` Julia Lawall
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=20200323014959.3267920c@elisabeth \
--to=sbrivio@redhat.com \
--cc=gokcekuler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.