Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp238407pxk; Wed, 2 Sep 2020 20:50:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwumYcdoG/4OGCPzj/a5McViBFVSYFDXkwcucZPA4RXhk27JcfgG1xrq5f+AhXDjTrIRvzN X-Received: by 2002:aa7:c98d:: with SMTP id c13mr1100278edt.199.1599105053836; Wed, 02 Sep 2020 20:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599105053; cv=none; d=google.com; s=arc-20160816; b=FkNf8MTRFUYR9VoWUKVOByerqC9jgKzgJWoDWSmBkFx3YdeJM+PUAauK4sSl6FiIEi otGW1t02ez7J2pgYQyEmVwRquFZwo4Klb3AykYLuKOqLeEKf8uep9IJNdOa/zYidYRNh juXWyXVl4MHIUoCuJlsBoSI97Dm6IvcTqzW3LpR/wyk9D6f3qpSlQlN+PfRxuMMIhgpv /jdMtIvLZl96hCd1pV6exbYaKy6lNwfqo8VqQdgl7+QCii4Z8QmblvCLgFFDfw7r+8QR hOT/lsIEbD3Y/7ezFvOcm99G8PGbYKK8w8eQ3og6ivF02uCXK6nj7yEO+4BV2n+A6N/W +Nqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=npE+6kgY3BgkJuk1F6OrPRsD1LD4neOO0rtoAG0vrnQ=; b=JTr8+hL+3GhEVwFk3Ao4EtswqfPphk6mW6QLKFUZPgdG5mu8PE3vdZw5p+eK6lIcjO /dTZrOBy31Mapvrh7LbmPq7l/8rhNmLZju3HZKGY3JDiSNb8U6+LAFI6hR7Og2Qn+HkI 29Top8duIjMfL9kjXV7FjsZcfGGPeidmT6W/lnw04crqx/Z/io7jAhEKTIpH49/k2Aog NNyx1ZOZ8PGKALepVB1dX/Ptu9Rmp3LYJddly9ZZV0wpALMi5RUk3T+P7sfQNJoFqT9g QLnF4JeFhg3s19GXYZeAbAw84qPKPX3pug8bCvHKzxeHK0N1VB6tJOprLMcOD6ybyA/K i4wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dfw35si2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si1090561eji.430.2020.09.02.20.50.31; Wed, 02 Sep 2020 20:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dfw35si2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728231AbgICDt1 (ORCPT + 99 others); Wed, 2 Sep 2020 23:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726821AbgICDtY (ORCPT ); Wed, 2 Sep 2020 23:49:24 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6991BC061244; Wed, 2 Sep 2020 20:49:24 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id 7so972445pgm.11; Wed, 02 Sep 2020 20:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=npE+6kgY3BgkJuk1F6OrPRsD1LD4neOO0rtoAG0vrnQ=; b=Dfw35si2hpu8HSbt7vYSTT6bRfqooFfqvtuJOMRu31s1zHcazuBWb8iZSDlBuUDlJw WdvvXEzbxkDfv/3wMT9hwIa3vgI16BabY30lQJYLF9R0iavh1iFZ5mGk1p3eyYnbcnIt 7n2iSOZwTocINzPyIwz3u4Q/OGjQEoQvlrkLRUo0IkDPHlmCNhJHHwtwiR1DVIWNH7BX Hic3wV6nKXzoAdqR6H42axB1idyI/qVKfN6zGYYz7PURerRBohxXjPLRKp84ckr6cF2x ynCINIfUNQ62j+R1DyQOwOdQdSEOjplBiy9BCntJl4IUlAL1jViGD+G9JAmkHs++SGmY O9bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=npE+6kgY3BgkJuk1F6OrPRsD1LD4neOO0rtoAG0vrnQ=; b=tcMF8sV4hyNiTt6R4MRPXqKW2jSfY5fgexwg+CoG8JuwRp7nnW42MQPvz5gooaC+ji jPspvrrfSHNr6rcDjeL71+/gNHQrPunZpUZgQ18gRnS2Q8LHqaXYK1V9m77Sy94l5CR/ nd2SYutv2X94JmaJbThLizSqT2A+BM1jRxgb3J+CRqbPvDBIAnToGlgIjpzbzKEnzI5o bonuycLjzHhkvF7nxecnO3IYdSKesO5nQXsrcy/dyd/FgqWBbSsIp9+PUre0crz/IdfE L1UfqIB+HHUTqEdm+pYaCp03JSAbtkBghnWm8PCygaDDmk/miIrS1j3vdpteyCp/bPoZ CtQQ== X-Gm-Message-State: AOAM530jcGlWPSlFQQBz4lr5PYyocQIvYUcfCL6UFVFu/TldFx6L14U6 X8Ef9WPUl6SfSRSEDM/ZmJg= X-Received: by 2002:a65:5c4c:: with SMTP id v12mr1078295pgr.95.1599104963899; Wed, 02 Sep 2020 20:49:23 -0700 (PDT) Received: from f3 (ae055068.dynamic.ppp.asahi-net.or.jp. [14.3.55.68]) by smtp.gmail.com with ESMTPSA id k4sm804155pjl.10.2020.09.02.20.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 20:49:22 -0700 (PDT) Date: Thu, 3 Sep 2020 12:49:18 +0900 From: Benjamin Poirier To: Coiby Xu Cc: devel@driverdev.osuosl.org, Manish Chopra , "supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER" , Greg Kroah-Hartman , Dan Carpenter , "open list:QLOGIC QLGE 10Gb ETHERNET DRIVER" , open list Subject: Re: [PATCH v3] staging: qlge: fix build breakage with dumping enabled Message-ID: <20200903034918.GA227281@f3> References: <20200902140031.203374-1-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200902140031.203374-1-coiby.xu@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-02 22:00 +0800, Coiby Xu wrote: > This fixes commit 0107635e15ac > ("staging: qlge: replace pr_err with netdev_err") which introduced an > build breakage of missing `struct ql_adapter *qdev` for some functions > and a warning of type mismatch with dumping enabled, i.e., > > $ make CFLAGS_MODULE="QL_ALL_DUMP=1 QL_OB_DUMP=1 QL_CB_DUMP=1 \ > QL_IB_DUMP=1 QL_REG_DUMP=1 QL_DEV_DUMP=1" M=drivers/staging/qlge > > qlge_dbg.c: In function ‘ql_dump_ob_mac_rsp’: > qlge_dbg.c:2051:13: error: ‘qdev’ undeclared (first use in this function); did you mean ‘cdev’? > 2051 | netdev_err(qdev->ndev, "%s\n", __func__); > | ^~~~ > qlge_dbg.c: In function ‘ql_dump_routing_entries’: > qlge_dbg.c:1435:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] > 1435 | "%s: Routing Mask %d = 0x%.08x\n", > | ~^ > | | > | char * > | %d > 1436 | i, value); > | ~ > | | > | int > qlge_dbg.c:1435:37: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=] > 1435 | "%s: Routing Mask %d = 0x%.08x\n", > | ~~~~^ > | | > | unsigned int > > Fixes: 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") > Reported-by: Benjamin Poirier > Suggested-by: Benjamin Poirier > Signed-off-by: Coiby Xu > --- Thanks for following up on this issue. [...] > @@ -1632,8 +1635,8 @@ void ql_dump_wqicb(struct wqicb *wqicb) > > void ql_dump_tx_ring(struct tx_ring *tx_ring) > { > - if (!tx_ring) > - return; > + struct ql_adapter *qdev = tx_ring->qdev; > + > netdev_err(qdev->ndev, "===================== Dumping tx_ring %d ===============\n", > tx_ring->wq_id); > netdev_err(qdev->ndev, "tx_ring->base = %p\n", tx_ring->wq_base); Did you actually check to confirm that the test can be removed? This is something that you should mention in the changelog at the very least since that change is not directly about fixing the build breakage and if it's wrong, it can lead to null pointer deref.