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 X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D899C433DF for ; Sun, 23 Aug 2020 22:09:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB4F62067C for ; Sun, 23 Aug 2020 22:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tiYH4emX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB4F62067C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iIl6xXAO7dPIKHfKghvRoWcmK/Mc0Oz9eHVeAMtoRC4=; b=tiYH4emXfl5ma7SRP2wtadih4 bxc9fCso8M2BzXb2FlRh/LAVjo6eEUsrLWdDEDFpC2aqpSVXD/d6Bw0MipsGu0rlaRziyHU82okaB vpIO9Hms0nnf1o7W5ckZfETLzZdaPX2gzScGdS0QW56DB5b6jRSYMYboyRsKhw7nqlHnJImLk7ohm we74LlYlAb4Ya1xyT57i6/75m+o/b0g459gpvPSaJEnsIWJ+wnotlmR9rAYSUPIYwtqvC3Zju+Tsu mI3NNQx0ZqzVuMe4SvQHCSL2k9hzuJDN3r53SLm4zNKIL6cYzpeQsYonJQSJimtuH/a0ClE4egS2N YmNJMj3mA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9y9Y-0005cC-6v; Sun, 23 Aug 2020 22:07:52 +0000 Received: from smtprelay0081.hostedemail.com ([216.40.44.81] helo=smtprelay.hostedemail.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k9y9V-0005bb-K9 for linux-arm-kernel@lists.infradead.org; Sun, 23 Aug 2020 22:07:50 +0000 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 256A0180A7FF5; Sun, 23 Aug 2020 22:07:47 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: straw46_5206e912704e X-Filterd-Recvd-Size: 2585 Received: from XPS-9350 (unknown [172.58.43.36]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Sun, 23 Aug 2020 22:07:42 +0000 (UTC) Message-ID: Subject: Re: [PATCH 0/8] drivers: phy: Constify static phy_ops structs From: Joe Perches To: Rikard Falkeborn , Kishon Vijay Abraham I , Vinod Koul Date: Sun, 23 Aug 2020 15:07:39 -0700 In-Reply-To: <20200823220025.17588-1-rikard.falkeborn@gmail.com> References: <20200823220025.17588-1-rikard.falkeborn@gmail.com> User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200823_180749_800064_33616A48 X-CRM114-Status: GOOD ( 15.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Peter Chen , linux-usb@vger.kernel.org, Alim Akhtar , Martin Blumenstingl , Shawn Guo , Sascha Hauer , Binghui Wang , Yu Chen , linux-kernel@vger.kernel.org, Bjorn Andersson , Andy Gross , NXP Linux Team , Pengutronix Kernel Team , linux-arm-msm@vger.kernel.org, Fabio Estevam , Seungwon Jeon 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 On Mon, 2020-08-24 at 00:00 +0200, Rikard Falkeborn wrote: > This series constifies all static phy_ops structs in drivers/phy. > Typically the only usage is to pass the address of it to devm_phy_create() > which takes a const pointer. The lone exception is in > drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c where the address of the > structs is assigned to the data-field in of_device_id, which is a const > void pointer. > > Making the structs const allows the compiler to put them in read-only > memory. > > The patches are all independent of each other, and have been > compile-tested only. Perhaps add phy_ops to scripts/const_structs.checkpatch too --- scripts/const_structs.checkpatch | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/const_structs.checkpatch b/scripts/const_structs.checkpatch index e9df9cc28a85..cd45cb3c2b04 100644 --- a/scripts/const_structs.checkpatch +++ b/scripts/const_structs.checkpatch @@ -39,6 +39,7 @@ nlmsvc_binding nvkm_device_chip of_device_id pci_raw_ops +phy_ops pipe_buf_operations platform_hibernation_ops platform_suspend_ops _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel