From patchwork Mon Oct 23 01:32:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 10021893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5047E60381 for ; Mon, 23 Oct 2017 01:32:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37C55286CC for ; Mon, 23 Oct 2017 01:32:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BDA5286E1; Mon, 23 Oct 2017 01:32:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B22A4286CC for ; Mon, 23 Oct 2017 01:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932302AbdJWBc1 (ORCPT ); Sun, 22 Oct 2017 21:32:27 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:28711 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932289AbdJWBcZ (ORCPT ); Sun, 22 Oct 2017 21:32:25 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20171023013223epoutp04af31b73f085ea26177d7b2a24b215de6~wDvpjGFee2016620166epoutp04a; Mon, 23 Oct 2017 01:32:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20171023013223epoutp04af31b73f085ea26177d7b2a24b215de6~wDvpjGFee2016620166epoutp04a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1508722343; bh=TLsvubBuoGyA7DwA+X+zBokXuv9MLoDRpyUDvK0OhKU=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=XGa3Ku6SloHQ0/Xnp2vJwqbuRS5jPFj2p73ijEYni3aM0GhoGJLASeohIy6F+4+ik /aV3mG22Yu7vv2SGjhSufN1j9ApJRmBR1Yh/Jsmqqt1OFLKT9ntFKkxNHhgSs0E8Z4 iZ24YDquvb2ckVJYpe/awWfwB4zzVrM6ltJ9aRsE= Received: from epsmges1p3.samsung.com (unknown [182.195.40.69]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20171023013223epcas1p2bff3096e1d978b826ab779a4d27bc953~wDvpRCOiE1614916149epcas1p2I; Mon, 23 Oct 2017 01:32:23 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 9F.78.04169.0A64DE95; Mon, 23 Oct 2017 10:32:16 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20171023013215epcas1p1d25606a511fb6dc2c037cc978ad5dd5a~wDviQjYiI0907509075epcas1p1t; Mon, 23 Oct 2017 01:32:15 +0000 (GMT) X-AuditID: b6c32a37-f0bff70000001049-f7-59ed46a06403 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id A8.07.04095.F964DE95; Mon, 23 Oct 2017 10:32:15 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OY90045G5LPR020@mmp2.samsung.com>; Mon, 23 Oct 2017 10:32:15 +0900 (KST) From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com Cc: rafael.j.wysocki@intel.com, chanwoo@kernel.org, inki.dae@samsung.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v5 6/7] PM / devfreq: Remove unneeded conditional statement Date: Mon, 23 Oct 2017 10:32:11 +0900 Message-id: <1508722332-10628-7-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1508722332-10628-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSbUhTYRTHfXb3crUW1/nSg4HIlaAMp3dueg0tJZNpflgIkZasm7uo6F66 d0pGkNMyNRWVMISlkgi6MM1JmhiSqUFlHzLnwFKyQg1nlomDaXS3m9/+55zf/znnPBwUkfWK wtAig5lmDFQJLg4QPnt1PCa6M92VE9tqkZDNzo9Ccv7PiohsWWoSkjOV6xJydtQqJrcaJgG5 YOkRk197XJIUVN01tiZQD9pqxerGIRtQbw2Ga4S5dFIhTeloJoI25Bt1RYaCZPxctvaMVhUf S0QTiWQCHmGg9HQynpaliU4vKuHGwCPKqJJSLqWhWBaPOZXEGEvNdEShkTUn45cIQiEnYhPk CoVCrozLO6lQccgVurDe+k5geoheb3rZDSrArrgO+KMQU8L21Qrg1TJsBMCpn+frQACndwB8 7F4Q7kOzk7cBXxgAsGXaI+ADN4B9jju+p8RYFBxfdfp0MKaBtX02H4RglQCOLzol3kIQdg7O uO8JvFqIHYUd/TuIV0uxs3C5dQnh24XDzbFlH++PpcPPfdu+1hCrF8P79mXOjHJBGrRs5vF8 EPzxekjCp4/AD1PJPH4XQLt1UcgHNQAu9VpEvCEOvqmz+IZAsENwY7texJulsKZaxiNqODzW DnidCnuH3/7fuA3A9pVxpAmEdQI/GwilTay+gGYJU5ycpfRsqaFAnm/UDwLfmUQljICB91kT AEMBflDqR7hyZCKqjC3XTwCIIniw1EpyKamOKr9BM0YtU1pCsxNAxf1NMxIWkm/kjs5g1hLK xFhlvII7hkSCwA9LQ/sdF2VYAWWmi2naRDP7PgHqH1YBiqU3ccTvWnNdzVyqxxG4kdaV2ug+ /STzC/MooNqR5jxwIm7SE3LhG5KbZRenMHMtqnbdr0i5vePBtDslu81pa66y20KsqKzBnFEV /le5Jdnae/4UcXfbirtHvu9eXbcurgRab81neMo7f89/ysQXXaPpe8fWti+/EM1G1o7gQraQ IqIQhqX+AR5RX2A8AwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e+xoO58t7eRBhcfG1tMvHGFxeL6l+es FpPuT2CxONv0ht3i8q45bBafe48wWtxuXMFm8XjFW3YHDo/Fe14yeWxa1cnm0bdlFaPH501y ASxRXDYpqTmZZalF+nYJXBk9c84wFczlqJhwcCljA+Mfti5GTg4JAROJy0daGLsYuTiEBNYx SjzbcIMNwvnBKDF/YzsLSBWbgJbE/hc3wDpEBPwkts9fD9bBLNDEKLG8/xZYQljAW+Lsj24m EJtFQFVi/vrvzCA2r4CrxKNp95kh1slJfNjziB3E5hRwk7i79isjiC0EVPP303+mCYw8CxgZ VjFKphYU56bnFhsVGOallusVJ+YWl+al6yXn525iBAbStsNafTsY7y+JP8QowMGoxMPLYPg2 Uog1say4MvcQowQHs5II7xwLoBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHe23nHIoUE0hNLUrNT UwtSi2CyTBycUg2M3UWCCztOvX3QWF2zZ65C6oePQcs/Pj+UsSQqxLdbgqUgdlHE6ZksR3/N Vk0yKBT1aLTPaWG1CN7dPtHsrM+9fTsagk1vTvDp/HBZ5sYErSajcyetNYL7OCd+YDkXxTvL ccvjk2fTk2+qHnWr3KZ9tuivrO6uSA6DxQlPnvK1yV2udGFzsVuqxFKckWioxVxUnAgAR6JO RyACAAA= X-CMS-MailID: 20171023013215epcas1p1d25606a511fb6dc2c037cc978ad5dd5a X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20171023013215epcas1p1d25606a511fb6dc2c037cc978ad5dd5a X-RootMTR: 20171023013215epcas1p1d25606a511fb6dc2c037cc978ad5dd5a References: <1508722332-10628-1-git-send-email-cw00.choi@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The freq_table array of each devfreq device is always not NULL. In result, it is unneeded to check whether profile->freq_table is NULL or not. Signed-off-by: Chanwoo Choi Acked-by: MyungJoo Ham --- drivers/devfreq/devfreq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 381f92e5e794..78fb496ecb4e 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -311,10 +311,9 @@ int update_devfreq(struct devfreq *devfreq) freqs.new = freq; devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); - if (devfreq->profile->freq_table) - if (devfreq_update_status(devfreq, freq)) - dev_err(&devfreq->dev, - "Couldn't update frequency transition information.\n"); + if (devfreq_update_status(devfreq, freq)) + dev_err(&devfreq->dev, + "Couldn't update frequency transition information.\n"); devfreq->previous_freq = freq; return err;