* [PATCH] staging: hp100: line over 80 characters
@ 2020-03-22 1:41 Gokce Kuler
2020-03-22 11:24 ` [Outreachy kernel] " Greg KH
2020-03-23 0:49 ` Stefano Brivio
0 siblings, 2 replies; 4+ messages in thread
From: Gokce Kuler @ 2020-03-22 1:41 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
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)) {
/* Conversion to new PCI API :
* I don't have the doc, but I assume that the card
* can map the full 32bit address space.
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Outreachy kernel] [PATCH] staging: hp100: line over 80 characters
2020-03-22 1:41 [PATCH] staging: hp100: line over 80 characters Gokce Kuler
@ 2020-03-22 11:24 ` Greg KH
2020-03-23 0:49 ` Stefano Brivio
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-03-22 11:24 UTC (permalink / raw)
To: Gokce Kuler; +Cc: outreachy-kernel
On Sun, Mar 22, 2020 at 04:41:37AM +0300, Gokce Kuler 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)) {
Needs to be indented one more space, right?
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Outreachy kernel] [PATCH] staging: hp100: line over 80 characters
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
2020-03-23 7:15 ` Julia Lawall
1 sibling, 1 reply; 4+ messages in thread
From: Stefano Brivio @ 2020-03-23 0:49 UTC (permalink / raw)
To: Gokce Kuler; +Cc: outreachy-kernel, gregkh
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Outreachy kernel] [PATCH] staging: hp100: line over 80 characters
2020-03-23 0:49 ` Stefano Brivio
@ 2020-03-23 7:15 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2020-03-23 7:15 UTC (permalink / raw)
To: Stefano Brivio; +Cc: Gokce Kuler, outreachy-kernel, gregkh
On Mon, 23 Mar 2020, Stefano Brivio wrote:
> 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.
Maybe with ()s? All those &s looks confusing.
julia
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-23 7:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-03-23 7:15 ` Julia Lawall
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.