lkml.org 
[lkml]   [2019]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] scsi: pm8001: clean up structurally dead code when PM8001_USE_MSIX is defined
On Sat, Mar 30, 2019 at 12:07 PM Walter Harms <wharms@bfs.de> wrote:
>
> the ifdef jungle does not make thinks more readable. I am aware that
> using neg is also not good but in this special case it seems helpful
> to have only one branch, like:
>
> static u32 pm80xx_chip_is_our_interupt(struct pm8001_hba_info *pm8001_ha)
> {
> #ifndef PM8001_USE_MSIX
> u32 value;
>
> value = pm8001_cr32(pm8001_ha, 0, MSGU_ODR);
> if (!value)
> return 0;
> #endif
> return 1;
>
> }
>
> just my 2 cents,
>
> re,
> wh

Both version looks good to me, I've acked Colin's version.

Thanks!

--
Jack Wang
Linux Kernel Developer

1&1 IONOS Cloud GmbH | Greifswalder Str. 207 | 10405 Berlin | Germany
Phone: +49 30 57700-8042 | Fax: +49 30 57700-8598
E-mail: jinpu.wang@cloud.ionos.com | Web: www.ionos.de


Head Office: Berlin, Germany
District Court Berlin Charlottenburg, Registration number: HRB 125506 B
Executive Management: Christoph Steffens, Matthias Steinberg, Achim Weiss

Member of United Internet

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient of this e-mail, you are hereby
notified that saving, distribution or use of the content of this
e-mail in any way is prohibited. If you have received this e-mail in
error, please notify the sender and delete the e-mail.

\
 
 \ /
  Last update: 2019-03-31 19:50    [W:0.058 / U:2.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site