Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp437883ybx; Tue, 29 Oct 2019 22:11:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI556BZS0o0ldkUPFfFSwCIx7QUBkvDhHi0A8ycaFVrMbAYh6GF0fISYPW0Nb7gHiUax29 X-Received: by 2002:aa7:dc1a:: with SMTP id b26mr29797525edu.139.1572412269304; Tue, 29 Oct 2019 22:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572412269; cv=none; d=google.com; s=arc-20160816; b=KTAhWRxAC3Sjit0080rmjQT8+JNn2jGka3VdCAiTmAM7FBU+xNi1rqxDaqoNPXF7Jz OwlrPXzKwgaZn/pQgX+UhqY+5G43AVrprk6V5TeM1+X+hN5a0ZqQ59o2/RBM58iPv8/c 0NP78sRAUUr+bT3w+WOoayHCfODUrMD8gDfS5qTf8TwKn2+sIhUj0+jO/ay8jQWmwvHI 7gckzgdUr4JT0xYLGHUBAinVLMICu+JTfvFhTDYb1zXB0Esp06ayDPZ0aqSPMi1EFbXS kyeRC8mYrp9CISm9Yh3eitjotZdz5W6eHIQoQkzW6MKFgOAlL8ZCFljFac2PXdY9xwfh AgSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+UZO5Rzpyae9BI3I3UhwNUHD9+mTPpwFLq884upLfIU=; b=N4ALP54b362ipZyS4DQBho488864e/zPYUmJt6Cl7EXBthHfjVkEenJmRMD53HWgqK eHeu1rUdKI9ubARpqm99PyP0mO8uwd5AsLj5oa2h2LzcI4vb3ewuKjwtu5D9CDFcfgPL KI/pteIiBrUeyKFtQj3mAllg8FiJFoGYlZ6GMg8MKT38CgkTBdtsPSrfJW6FdAe6h3i3 Hqg9kfpb1K63BJ3/lv7y6UL/IVNadwPXvNoLamYajMU+sa26QJREFzEcwxe/YzBrBx4B nKwWnDDolKGA6Upwz2L322PHxYQs/2wOC5jEdYVfAQN9LnOHX0wDJGo95vkGjV3DAcx8 sCUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GaC3Sbcr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si555445eju.426.2019.10.29.22.10.45; Tue, 29 Oct 2019 22:11:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GaC3Sbcr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbfJ3FJO (ORCPT + 99 others); Wed, 30 Oct 2019 01:09:14 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:41808 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbfJ3FJO (ORCPT ); Wed, 30 Oct 2019 01:09:14 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9U59AEd030682; Wed, 30 Oct 2019 00:09:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572412150; bh=+UZO5Rzpyae9BI3I3UhwNUHD9+mTPpwFLq884upLfIU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=GaC3SbcrrCYVrhz+qF5M0oNiwmYRF7DAqBcRQ+KiT9r3OYYmpBnOTvzePUTdrl2dh r/UPAbCEkAdjGlY7FMP1TRlDV+s5P5d5H03oL1uMYaZQm6JjjEpcaq+Vh+q9uYJU3A P3ArbojLgNed10bOwUQ0HmDpMdqeYggvkZhiHtFs= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9U59AeA012986 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 30 Oct 2019 00:09:10 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 30 Oct 2019 00:08:57 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 30 Oct 2019 00:09:09 -0500 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9U596Lf053443; Wed, 30 Oct 2019 00:09:07 -0500 Subject: Re: [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0 To: Saurav Girepunje , , , CC: References: <20191028202945.GA29284@saurav> From: Kishon Vijay Abraham I Message-ID: Date: Wed, 30 Oct 2019 10:38:33 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191028202945.GA29284@saurav> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 29/10/19 1:59 AM, Saurav Girepunje wrote: > Compare pointer-typed values to NULL rather than 0 > > Signed-off-by: Saurav Girepunje I've already merged a patch by Ben Dooks for fixing this https://lore.kernel.org/r/20191015160332.15244-2-ben.dooks@codethink.co.uk Thanks Kishon > --- > drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadcom/phy-brcm-usb-init.c > index 3c53625f8bc2..2ea1e84b544b 100644 > --- a/drivers/phy/broadcom/phy-brcm-usb-init.c > +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c > @@ -707,7 +707,7 @@ static void brcmusb_usb3_otp_fix(struct brcm_usb_init_params *params) > void __iomem *xhci_ec_base = params->xhci_ec_regs; > u32 val; > > - if (params->family_id != 0x74371000 || xhci_ec_base == 0) > + if (params->family_id != 0x74371000 || xhci_ec_base == NULL) > return; > brcmusb_writel(0xa20c, USB_XHCI_EC_REG(xhci_ec_base, IRAADR)); > val = brcmusb_readl(USB_XHCI_EC_REG(xhci_ec_base, IRADAT)); >