lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Aug 2020 19:16:08 +0800
From:   Coiby Xu <coiby.xu@...il.com>
To:     Benjamin Poirier <benjamin.poirier@...il.com>
Cc:     devel@...verdev.osuosl.org, Manish Chopra <manishc@...vell.com>,
        "supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" 
        <GR-Linux-NIC-Dev@...vell.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        "open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: qlge: fix build breakage with dumping enabled

On Fri, Aug 21, 2020 at 05:31:59PM +0900, Benjamin Poirier wrote:
>On 2020-08-21 15:03 +0800, Coiby Xu wrote:
>> This fixes commit 0107635e15ac
>> ("staging: qlge: replace pr_err with netdev_err") which introduced an
>> build breakage with dumping enabled, i.e.,
>>
>>     $ QL_ALL_DUMP=1 QL_OB_DUMP=1 QL_CB_DUMP=1 QL_REG_DUMP=1 \
>>       QL_IB_DUMP=1 QL_DEV_DUMP=1 make M=drivers/staging/qlge
>>
>> Fixes: 0107635e15ac ("taging: qlge: replace pr_err with netdev_err")
>			^ staging

Thank you for reminding me of the typo!

>> Reported-by: Benjamin Poirier <benjamin.poirier@...il.com>
>> Signed-off-by: Coiby Xu <coiby.xu@...il.com>
>> ---
>>  drivers/staging/qlge/qlge.h      | 42 ++++++++++++++++----------------
>>  drivers/staging/qlge/qlge_dbg.c  | 36 +++++++++++++--------------
>>  drivers/staging/qlge/qlge_main.c |  4 +--
>>  3 files changed, 41 insertions(+), 41 deletions(-)
>>
>[...]
>> @@ -1615,7 +1615,7 @@ void ql_dump_qdev(struct ql_adapter *qdev)
>>  #endif
>>
>>  #ifdef QL_CB_DUMP
>> -void ql_dump_wqicb(struct wqicb *wqicb)
>> +void ql_dump_wqicb(struct ql_adapter *qdev, struct wqicb *wqicb)
>>  {
>
>This can be fixed without adding another argument:
>
>	struct tx_ring *tx_ring = container_of(wqicb, struct tx_ring, wqicb);
>	struct ql_adapter *qdev = tx_ring->qdev;
>
>>  	netdev_err(qdev->ndev, "Dumping wqicb stuff...\n");
>>  	netdev_err(qdev->ndev, "wqicb->len = 0x%x\n", le16_to_cpu(wqicb->len));
>> @@ -1630,7 +1630,7 @@ void ql_dump_wqicb(struct wqicb *wqicb)
>>  		   (unsigned long long)le64_to_cpu(wqicb->cnsmr_idx_addr));
>>  }
>>
>> -void ql_dump_tx_ring(struct tx_ring *tx_ring)
>> +void ql_dump_tx_ring(struct ql_adapter *qdev, struct tx_ring *tx_ring)
>>  {
>
>This can be fixed without adding another argument:
>	struct ql_adapter *qdev;
>
>	if (!tx_ring)
>		return;
>
>	qdev = tx_ring->qdev;
>
>... similar comment for the other instances.

Thank you for the simpler solution!

For QL_OB_DUMP and QL_IB_DUMP, `struct ql_adapter *qdev` can't be
obtained via container_of. So qdev are still directly passed to these
functions.

--
Best regards,
Coiby

Powered by blists - more mailing lists