From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EFC0C433FE for ; Thu, 6 Jan 2022 12:16:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238570AbiAFMQL (ORCPT ); Thu, 6 Jan 2022 07:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238347AbiAFMQK (ORCPT ); Thu, 6 Jan 2022 07:16:10 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5290CC061245 for ; Thu, 6 Jan 2022 04:16:10 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id c9-20020a17090a1d0900b001b2b54bd6c5so8277266pjd.1 for ; Thu, 06 Jan 2022 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=VWuYcofoSfJWAV4N8jaIG1D93UCOzzLF4pnjMZckQdHuwfgaz+x204qWdN4QF4YoRD jjXdv6nQCa0cdQvhgmsH706TQG5JQqC2UipfolVHtapLb6VJ6mjx3mvAMAvJ9Ooi5nB6 CRsCNuUmRVJtehrSnmYuebPoAmJSgHGuYmCNi47cAYBd27WmmUPIrHfBja4EQVUVAYvE xHEMWdoc093Hihp5ksbATTC/pSlSafiFyvDCnDXh1YrfV/2OCzLMdP60JaQ0C2aNaVkj tim9w33+IK49XDuWb+ftGMo9xZMAsOF+xNjlHqYS+VRwvF0me3YYKY1Vt79vdnY/4VeR RXUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=Culg7lFyMKDcs8HuFmsqvCSAlrFMKxrfPrWzWgKwmM+rv6F1KlAzESfzhEncBrV6Dk PQ4bPiciWc8pdxyyOZeYJ44KXHpaL5b8DFyRXg5eBlHEF75MhbOucu374w/MKbWybmiv 9XCzvoy4Aho5p0O/SPTyR6Xk0PG28EXNzmqAAlrJh+21LUu73wZ+lDgrizG7slep0ipe 6FXzhQmkT9Jcw7zjnjQOcnkExlC9VfY5JpVo9rcPwbDdr5zsoN5L+O68XmtIectWfvwh QaIlOCUqd61wkM9dWmIFtxGZTs5huqZkRkBpwwF81ud0dTrjP2syOoz3WiRJ82K5ZknE GacA== X-Gm-Message-State: AOAM531JHOyjCDm9+5oWr/Hrx4863R4WAZr1u1WN2A5jUZYJUGJI2PU5 QuwE+AhK0m08oTcvyLSOz6s= X-Google-Smtp-Source: ABdhPJzV2qd7Kyc2ZIOHuzuuD3AFWMO67x7jgDMNj2Z9+hCizMBZuXOekzZfGXgf9RDEl+VUGs7ztA== X-Received: by 2002:a17:90b:4f4a:: with SMTP id pj10mr9731709pjb.112.1641471369839; Thu, 06 Jan 2022 04:16:09 -0800 (PST) Received: from 8345e2a12d0c ([159.226.95.43]) by smtp.gmail.com with ESMTPSA id b5sm2401828pfm.155.2022.01.06.04.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 04:16:09 -0800 (PST) Date: Thu, 6 Jan 2022 12:16:05 +0000 From: Miaoqian Lin To: Chun-Kuang Hu Cc: Philipp Zabel , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Matthias Brugger , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-phy@lists.infradead.org, linux-kernel Subject: Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Message-ID: <20220106121524.GA25165@8345e2a12d0c> References: <20211224082103.7658-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Chun-Kuang: On Fri, Dec 31, 2021 at 12:31:33AM +0800, Chun-Kuang Hu wrote: > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > index 28ad9403c441..67b005d5b9e3 100644 > > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > @@ -146,6 +146,8 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > mipi_tx->driver_data = of_device_get_match_data(dev); > > + if (!mipi_tx->driver_data) > > I'm confused. mtk_mipi_tx_probe() is called because this device node's > compatible match one in mtk_mipi_tx_match[]. So I think the return > value of of_device_get_match_data(dev) would not be NULL. If this is > true, this checking is redundant. > I think your are right, this checking is redundant. Thanks for your reply. Regards, Miaoqian. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B911FC433F5 for ; Thu, 6 Jan 2022 12:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jn2h3R0snaOb6Z7wdHpnPC4JSpgkDLFHwbzcZvzn69M=; b=a3Q9r14g+Ki3Ro TOhAak9y47sYTJ1+MWYCRsyUnu8+w70xTxbZ+6TYTy5K94RwUOQW/TABsK6LShj5PoEz1tYaeraVy /wYCL40cnvOzq0FkLFu9Wr4L0eM+AV9jxRhQDOSIN8NiKvFpEcmSOdE+Q6EVYvB1Hw+WsjrwJfD7H 6RiDthtWWSUmVoMO5ieYZf3Iv7MiN8ePHpyorLTSQeLbvDN2qT53GU9tu+VjJXVPyNugpMMa6VueH Z9Uko5+fIE5s4nQdEH1EO1YK+FQBRdt0fz5Y3ti9NftaRZEUilCdUHUnkxJkxaVE2oIAsFmDdP2KY PyRYqP+5EkwaWif35Ttg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgj-00HaTV-Uv; Thu, 06 Jan 2022 12:16:13 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgh-00HaS7-TE; Thu, 06 Jan 2022 12:16:13 +0000 Received: by mail-pl1-x631.google.com with SMTP id l8so150879plt.6; Thu, 06 Jan 2022 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=VWuYcofoSfJWAV4N8jaIG1D93UCOzzLF4pnjMZckQdHuwfgaz+x204qWdN4QF4YoRD jjXdv6nQCa0cdQvhgmsH706TQG5JQqC2UipfolVHtapLb6VJ6mjx3mvAMAvJ9Ooi5nB6 CRsCNuUmRVJtehrSnmYuebPoAmJSgHGuYmCNi47cAYBd27WmmUPIrHfBja4EQVUVAYvE xHEMWdoc093Hihp5ksbATTC/pSlSafiFyvDCnDXh1YrfV/2OCzLMdP60JaQ0C2aNaVkj tim9w33+IK49XDuWb+ftGMo9xZMAsOF+xNjlHqYS+VRwvF0me3YYKY1Vt79vdnY/4VeR RXUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=sSSLH8gEHbQkMX7sw985l8vSj9djKguTztIGNXObcxzO41tdF1P8OQz6KLfqphF4uf tLmM/q/pez3IFhdRrZ+n0+rulRFd6lkS/3838bQI1Rl9iBU2pqu+UuPsdSxz2pysz4R2 hI1iQtdrPxwDdBgmwv5mIwO1Bqli6+QYn5+xzEQyHdBfA1zhqXPU9hjKMOsaeTIJ5Q8K QZaXsQF/fijwD4BLKhhIWZQURMMvIp9BCMupUgHR4tsMuCA39xaaI1WYk6lIcJc+2DK9 5dp0l4LwjgDDH8qcAOg4odlSe+tORxX/cvrw/no7klSJ3qxMAwHa52tydLRkJZhxPNZU GsRQ== X-Gm-Message-State: AOAM533L8wu0GNAGEbSNNHBOebAOjhELYcSrYD/vgqZacL6xMR93T57Y imyllDDoPvJrB/BdSF211Pn7lB0h3ENE1LoAyW4= X-Google-Smtp-Source: ABdhPJzV2qd7Kyc2ZIOHuzuuD3AFWMO67x7jgDMNj2Z9+hCizMBZuXOekzZfGXgf9RDEl+VUGs7ztA== X-Received: by 2002:a17:90b:4f4a:: with SMTP id pj10mr9731709pjb.112.1641471369839; Thu, 06 Jan 2022 04:16:09 -0800 (PST) Received: from 8345e2a12d0c ([159.226.95.43]) by smtp.gmail.com with ESMTPSA id b5sm2401828pfm.155.2022.01.06.04.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 04:16:09 -0800 (PST) Date: Thu, 6 Jan 2022 12:16:05 +0000 From: Miaoqian Lin To: Chun-Kuang Hu Cc: Philipp Zabel , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Matthias Brugger , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-phy@lists.infradead.org, linux-kernel Subject: Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Message-ID: <20220106121524.GA25165@8345e2a12d0c> References: <20211224082103.7658-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_041611_973822_CC11BDB5 X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, Chun-Kuang: On Fri, Dec 31, 2021 at 12:31:33AM +0800, Chun-Kuang Hu wrote: > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > index 28ad9403c441..67b005d5b9e3 100644 > > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > @@ -146,6 +146,8 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > mipi_tx->driver_data = of_device_get_match_data(dev); > > + if (!mipi_tx->driver_data) > > I'm confused. mtk_mipi_tx_probe() is called because this device node's > compatible match one in mtk_mipi_tx_match[]. So I think the return > value of of_device_get_match_data(dev) would not be NULL. If this is > true, this checking is redundant. > I think your are right, this checking is redundant. Thanks for your reply. Regards, Miaoqian. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1182DC433EF for ; Thu, 6 Jan 2022 12:16:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5927810E6A7; Thu, 6 Jan 2022 12:16:11 +0000 (UTC) Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B83510E6A7 for ; Thu, 6 Jan 2022 12:16:10 +0000 (UTC) Received: by mail-pj1-x1030.google.com with SMTP id l10-20020a17090a384a00b001b22190e075so8237055pjf.3 for ; Thu, 06 Jan 2022 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=VWuYcofoSfJWAV4N8jaIG1D93UCOzzLF4pnjMZckQdHuwfgaz+x204qWdN4QF4YoRD jjXdv6nQCa0cdQvhgmsH706TQG5JQqC2UipfolVHtapLb6VJ6mjx3mvAMAvJ9Ooi5nB6 CRsCNuUmRVJtehrSnmYuebPoAmJSgHGuYmCNi47cAYBd27WmmUPIrHfBja4EQVUVAYvE xHEMWdoc093Hihp5ksbATTC/pSlSafiFyvDCnDXh1YrfV/2OCzLMdP60JaQ0C2aNaVkj tim9w33+IK49XDuWb+ftGMo9xZMAsOF+xNjlHqYS+VRwvF0me3YYKY1Vt79vdnY/4VeR RXUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=u3W1OYKY7UnA5x9HrqUCHrB3VE7uEyWGUvqnI+OwsCm1sGqsNE6XRBFuUgCndif9rw f7QqVqD2lxuUUfI1Pmuz6gB7uaXGs8vRe/qHw5gksweHFCkm0TwInhZrvYVSSd3dzmsa D3RTgNqMp8FJsMShKS29MfBdCSpH1LfJYaCRGZnuJx8PCQ5iE/hSOifsjQj2XV01BZFM FgwAltZ/7yIURtWmK9b/Hi8sPi0ADnOZK0gkEtqwM1ZQGYrIBJZc73rlMsL7XSm+tldp PXZCOB5Q5s17J62/9iT/FXE4pYyeRVxheAYSjh4rNvWOLm6UgrB1Sfu+srDyZKve19UC LNaA== X-Gm-Message-State: AOAM5320IZq1g44t5DmI/Hf4TcHCtG2eDOHdIrguno4hhay4TfTb82nH GSp2qwI40kfegZJ3DDT10Lg= X-Google-Smtp-Source: ABdhPJzV2qd7Kyc2ZIOHuzuuD3AFWMO67x7jgDMNj2Z9+hCizMBZuXOekzZfGXgf9RDEl+VUGs7ztA== X-Received: by 2002:a17:90b:4f4a:: with SMTP id pj10mr9731709pjb.112.1641471369839; Thu, 06 Jan 2022 04:16:09 -0800 (PST) Received: from 8345e2a12d0c ([159.226.95.43]) by smtp.gmail.com with ESMTPSA id b5sm2401828pfm.155.2022.01.06.04.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 04:16:09 -0800 (PST) Date: Thu, 6 Jan 2022 12:16:05 +0000 From: Miaoqian Lin To: Chun-Kuang Hu Subject: Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Message-ID: <20220106121524.GA25165@8345e2a12d0c> References: <20211224082103.7658-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-phy@lists.infradead.org, linux-kernel , DRI Development , Kishon Vijay Abraham I , Matthias Brugger , Vinod Koul , "moderated list:ARM/Mediatek SoC support" , Chunfeng Yun , Linux ARM Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Chun-Kuang: On Fri, Dec 31, 2021 at 12:31:33AM +0800, Chun-Kuang Hu wrote: > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > index 28ad9403c441..67b005d5b9e3 100644 > > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > @@ -146,6 +146,8 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > mipi_tx->driver_data = of_device_get_match_data(dev); > > + if (!mipi_tx->driver_data) > > I'm confused. mtk_mipi_tx_probe() is called because this device node's > compatible match one in mtk_mipi_tx_match[]. So I think the return > value of of_device_get_match_data(dev) would not be NULL. If this is > true, this checking is redundant. > I think your are right, this checking is redundant. Thanks for your reply. Regards, Miaoqian. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEE5BC433EF for ; Thu, 6 Jan 2022 12:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VqabFheU1/8JusByUQlBuU8pztpwAnAk0TXCYQd6mfw=; b=qZapyrhCcaHThH ePQ3uDeDEJ8tPzA8d6kn+hqYtn4W0lL6dLoKXOrG9qrz2T7I3DEWjegjlR34SXfVQgs6lDtvmosjt 8Rl3Gtqu/BtVi6ySSVrKV1/LSGabbb8jD9lwNLZp4vyaLVV8yoVKjaNbMsaTbWgX/IuU+KOCtjpSF OnjDyRmc2tFxgSnjoytq+/X/aD+SzjVmHj2/h/eD4aEJbT8lpZbMQz2KYBQo0c531rU16mHXrGqLv RMMHvI9Iha6Uq1iTAvN3l/OTTiLUaugN29ds9Vv89zorB5AYhMCBK+knPS3O5BpEElScNJcZUhii/ N18t349aoXrw6F1oIwpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgu-00HaVa-4D; Thu, 06 Jan 2022 12:16:24 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgh-00HaS7-TE; Thu, 06 Jan 2022 12:16:13 +0000 Received: by mail-pl1-x631.google.com with SMTP id l8so150879plt.6; Thu, 06 Jan 2022 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=VWuYcofoSfJWAV4N8jaIG1D93UCOzzLF4pnjMZckQdHuwfgaz+x204qWdN4QF4YoRD jjXdv6nQCa0cdQvhgmsH706TQG5JQqC2UipfolVHtapLb6VJ6mjx3mvAMAvJ9Ooi5nB6 CRsCNuUmRVJtehrSnmYuebPoAmJSgHGuYmCNi47cAYBd27WmmUPIrHfBja4EQVUVAYvE xHEMWdoc093Hihp5ksbATTC/pSlSafiFyvDCnDXh1YrfV/2OCzLMdP60JaQ0C2aNaVkj tim9w33+IK49XDuWb+ftGMo9xZMAsOF+xNjlHqYS+VRwvF0me3YYKY1Vt79vdnY/4VeR RXUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=sSSLH8gEHbQkMX7sw985l8vSj9djKguTztIGNXObcxzO41tdF1P8OQz6KLfqphF4uf tLmM/q/pez3IFhdRrZ+n0+rulRFd6lkS/3838bQI1Rl9iBU2pqu+UuPsdSxz2pysz4R2 hI1iQtdrPxwDdBgmwv5mIwO1Bqli6+QYn5+xzEQyHdBfA1zhqXPU9hjKMOsaeTIJ5Q8K QZaXsQF/fijwD4BLKhhIWZQURMMvIp9BCMupUgHR4tsMuCA39xaaI1WYk6lIcJc+2DK9 5dp0l4LwjgDDH8qcAOg4odlSe+tORxX/cvrw/no7klSJ3qxMAwHa52tydLRkJZhxPNZU GsRQ== X-Gm-Message-State: AOAM533L8wu0GNAGEbSNNHBOebAOjhELYcSrYD/vgqZacL6xMR93T57Y imyllDDoPvJrB/BdSF211Pn7lB0h3ENE1LoAyW4= X-Google-Smtp-Source: ABdhPJzV2qd7Kyc2ZIOHuzuuD3AFWMO67x7jgDMNj2Z9+hCizMBZuXOekzZfGXgf9RDEl+VUGs7ztA== X-Received: by 2002:a17:90b:4f4a:: with SMTP id pj10mr9731709pjb.112.1641471369839; Thu, 06 Jan 2022 04:16:09 -0800 (PST) Received: from 8345e2a12d0c ([159.226.95.43]) by smtp.gmail.com with ESMTPSA id b5sm2401828pfm.155.2022.01.06.04.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 04:16:09 -0800 (PST) Date: Thu, 6 Jan 2022 12:16:05 +0000 From: Miaoqian Lin To: Chun-Kuang Hu Cc: Philipp Zabel , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Matthias Brugger , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-phy@lists.infradead.org, linux-kernel Subject: Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Message-ID: <20220106121524.GA25165@8345e2a12d0c> References: <20211224082103.7658-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_041611_973822_CC11BDB5 X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi, Chun-Kuang: On Fri, Dec 31, 2021 at 12:31:33AM +0800, Chun-Kuang Hu wrote: > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > index 28ad9403c441..67b005d5b9e3 100644 > > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > @@ -146,6 +146,8 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > mipi_tx->driver_data = of_device_get_match_data(dev); > > + if (!mipi_tx->driver_data) > > I'm confused. mtk_mipi_tx_probe() is called because this device node's > compatible match one in mtk_mipi_tx_match[]. So I think the return > value of of_device_get_match_data(dev) would not be NULL. If this is > true, this checking is redundant. > I think your are right, this checking is redundant. Thanks for your reply. Regards, Miaoqian. -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF890C433F5 for ; Thu, 6 Jan 2022 12:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8Nq8vzIaNEusKXegdrOYFkyqn4Qvep66aLR7sGZiiE8=; b=pkFvEuMcqKOUsq 3X0vc6zmkt1U52BWQYOOkMdWv8CbWSMPfFYEyk01VfLC2ryeZ5meDR6hMZHNgMynUoNqhMoAiDuXK 1wjA5zY7i3nOEzwrDu83juX0LelPa/1N1EPRkQjm3lTJGLRnL5zvFWdHld7f1v0egXJKFnlFRbPG2 sjJ7vyPIgrI0Ca8n+AnJ0Rq0QLaDvFol6dRpDg7oeLagKqtllxA7niTtN3HbHIV1WKg6LN3U52w3Q DlDGPbQdraGZoI/KEDDICAEfGpfqU1hpz2W8Xr2H8Fvp0etMry8SgBPgQnOxUeRaQAS/xj+786H2j Z0achp8VEhFFEQyvjjkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgl-00HaTf-KW; Thu, 06 Jan 2022 12:16:15 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Rgh-00HaS7-TE; Thu, 06 Jan 2022 12:16:13 +0000 Received: by mail-pl1-x631.google.com with SMTP id l8so150879plt.6; Thu, 06 Jan 2022 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=VWuYcofoSfJWAV4N8jaIG1D93UCOzzLF4pnjMZckQdHuwfgaz+x204qWdN4QF4YoRD jjXdv6nQCa0cdQvhgmsH706TQG5JQqC2UipfolVHtapLb6VJ6mjx3mvAMAvJ9Ooi5nB6 CRsCNuUmRVJtehrSnmYuebPoAmJSgHGuYmCNi47cAYBd27WmmUPIrHfBja4EQVUVAYvE xHEMWdoc093Hihp5ksbATTC/pSlSafiFyvDCnDXh1YrfV/2OCzLMdP60JaQ0C2aNaVkj tim9w33+IK49XDuWb+ftGMo9xZMAsOF+xNjlHqYS+VRwvF0me3YYKY1Vt79vdnY/4VeR RXUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ezhOL9IQmLkdhn7bT2hYUZscONiXzj3Zulc4AqaqV74=; b=sSSLH8gEHbQkMX7sw985l8vSj9djKguTztIGNXObcxzO41tdF1P8OQz6KLfqphF4uf tLmM/q/pez3IFhdRrZ+n0+rulRFd6lkS/3838bQI1Rl9iBU2pqu+UuPsdSxz2pysz4R2 hI1iQtdrPxwDdBgmwv5mIwO1Bqli6+QYn5+xzEQyHdBfA1zhqXPU9hjKMOsaeTIJ5Q8K QZaXsQF/fijwD4BLKhhIWZQURMMvIp9BCMupUgHR4tsMuCA39xaaI1WYk6lIcJc+2DK9 5dp0l4LwjgDDH8qcAOg4odlSe+tORxX/cvrw/no7klSJ3qxMAwHa52tydLRkJZhxPNZU GsRQ== X-Gm-Message-State: AOAM533L8wu0GNAGEbSNNHBOebAOjhELYcSrYD/vgqZacL6xMR93T57Y imyllDDoPvJrB/BdSF211Pn7lB0h3ENE1LoAyW4= X-Google-Smtp-Source: ABdhPJzV2qd7Kyc2ZIOHuzuuD3AFWMO67x7jgDMNj2Z9+hCizMBZuXOekzZfGXgf9RDEl+VUGs7ztA== X-Received: by 2002:a17:90b:4f4a:: with SMTP id pj10mr9731709pjb.112.1641471369839; Thu, 06 Jan 2022 04:16:09 -0800 (PST) Received: from 8345e2a12d0c ([159.226.95.43]) by smtp.gmail.com with ESMTPSA id b5sm2401828pfm.155.2022.01.06.04.16.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 04:16:09 -0800 (PST) Date: Thu, 6 Jan 2022 12:16:05 +0000 From: Miaoqian Lin To: Chun-Kuang Hu Cc: Philipp Zabel , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Matthias Brugger , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-phy@lists.infradead.org, linux-kernel Subject: Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Message-ID: <20220106121524.GA25165@8345e2a12d0c> References: <20211224082103.7658-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_041611_973822_CC11BDB5 X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Chun-Kuang: On Fri, Dec 31, 2021 at 12:31:33AM +0800, Chun-Kuang Hu wrote: > > diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > index 28ad9403c441..67b005d5b9e3 100644 > > --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c > > @@ -146,6 +146,8 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) > > return -ENOMEM; > > > > mipi_tx->driver_data = of_device_get_match_data(dev); > > + if (!mipi_tx->driver_data) > > I'm confused. mtk_mipi_tx_probe() is called because this device node's > compatible match one in mtk_mipi_tx_match[]. So I think the return > value of of_device_get_match_data(dev) would not be NULL. If this is > true, this checking is redundant. > I think your are right, this checking is redundant. Thanks for your reply. Regards, Miaoqian. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel