From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755029AbdCTRMv (ORCPT ); Mon, 20 Mar 2017 13:12:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52336 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753558AbdCTRMo (ORCPT ); Mon, 20 Mar 2017 13:12:44 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B4BC96081F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: mwifiex: pcie: clean up error prints in mwifiex_pcie_reset_notify() From: Kalle Valo In-Reply-To: <20170307204746.6294-1-briannorris@chromium.org> References: <20170307204746.6294-1-briannorris@chromium.org> To: Brian Norris Cc: Amitkumar Karwar , Nishant Sarmukadam , , linux-wireless@vger.kernel.org, Brian Norris User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20170320170456.83A596084C@smtp.codeaurora.org> Date: Mon, 20 Mar 2017 17:04:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Brian Norris wrote: > We shouldn't be printing a kernel pointer as a decimal integer. But we > really shouldn't be printing this case at all; we should never get here > with NULL drvdata. We've eliminated this unnecessary conditional in > several other places, so kill it here too. > > Similarly, there's no need to check for '!pdev'; we are guaranteed to > have a real device here. > > And finally, use dev_err() instead of pr_err(). > > This yields (for failed PCIe resets): > > [ 68.286586] mwifiex_pcie 0000:01:00.0: mwifiex_pcie_reset_notify: adapter structure is not valid > > instead of: > > [ 82.932658] mwifiex_pcie: mwifiex_pcie_reset_notify: Card or adapter structure is not valid (-270880688088) > > Signed-off-by: Brian Norris Patch applied to wireless-drivers-next.git, thanks. 520334156213 mwifiex: pcie: clean up error prints in mwifiex_pcie_reset_notify() -- https://patchwork.kernel.org/patch/9609861/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches