staging: hp100: line over 80 characters
PATCH 1/1 staging: hp100: line over 80 characters
Moved to the bottom line after == operator for it exceeds 80 character
--- drivers/staging/hp/hp100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/hp/hp100.c +2 -1
@@ -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.
Signature · 1 line
2.7.4
Greg KH
maintainerQuoted 12 lines · Gokce Kuler
Moved to the bottom line after == operator for it exceeds 80 character
Signed-off-by Gokce Kuler <[email protected]>--- drivers/staging/hp/hp100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/hp/hp100.c +0
-0
drivers/staging/hp/hp100.c static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, · line 553
Quoted 6 lines
drivers/staging/hp/hp100.c +2
-1@@ -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?
Quoted 12 lines · On Sun, 22 Mar 2020 04:41:37 +0300 Gokce Kuler <[email protected]> wrote:
Moved to the bottom line after == operator for it exceeds 80 character
Signed-off-by Gokce Kuler <[email protected]>--- drivers/staging/hp/hp100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/hp/hp100.c +0
-0
drivers/staging/hp/hp100.c static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, · line 553
Quoted 6 lines
drivers/staging/hp/hp100.c +2
-1@@ -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.
Signature · 1 line
Stefano
Quoted 23 lines · Stefano Brivio
Quoted 12 lines · On Sun, 22 Mar 2020 04:41:37 +0300 Gokce Kuler <[email protected]> wrote:
Moved to the bottom line after == operator for it exceeds 80 character
Signed-off-by Gokce Kuler <[email protected]>--- drivers/staging/hp/hp100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/hp/hp100.c +0
-0drivers/staging/hp/hp100.c static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, · line 553
Quoted 6 lines
drivers/staging/hp/hp100.c +2
-1@@ -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:
Quoted 4 lines
a & (x | y) == x | y <=> a & x && a & yit 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