Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp840201rwb; Thu, 22 Sep 2022 07:05:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HXwXLIDXkO/iE02EzWJ8HLE08P3vxH/w8mdlaiCdOzDoyPz/784iNaOrktIRFw7D7pW3h X-Received: by 2002:a05:6a00:16d6:b0:53b:3e58:1c6f with SMTP id l22-20020a056a0016d600b0053b3e581c6fmr3797818pfc.7.1663855556943; Thu, 22 Sep 2022 07:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855556; cv=none; d=google.com; s=arc-20160816; b=E8VABsT/cIeWywuj3g57DqM9ovMZEYp5mVOavvV7+sV8GTEYEYavAimhObnyZJ4s+j HX0scwDPXdOKFIt+X92GuEaR7B9QMq9lv25y2ct21fwVR/9ALHgj0Lo++0YI7y/wrBNM qwahbdzrtkleIQTDRYnuUxqojktJNNlmjC1htx44eh3vvMH3602RcVnCBMsu93EIGMjM VgxQBZKOnFWIWCjQ1UH0/oRI7+dBBSois3OI+JFtjQeoPlRelbmuYY8KjiKCCs6u1asL U7YVzJEOd+ECDMEkPtOqFNvyKewL0sozAq5k5xBByOHGJbuFxdNUaLfMlzuVa/w6nY4O 92sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EPE093FrzkEFXXu7vH2TPayQsjIWMWv8Nu/b4FGYFjQ=; b=0J9VsbcKdaTDX1w1FPeWvShBXEUpWxExn3iFpNitulevndItrUpMy/aS7jq7A7mdYe lCIv72LkZHeuX++EMO7ulKpNACStCgJ0Mey5Vuycuy/DoSzG+eFb/13EZqpFXFmQSSRh lIqddr1uhOgS/ynnFpiAanY8DYite7dH990PJ86YAynOpSrJ88hOiZdvOXJyvd5cv60f bBO54TLhDZ70YPIFLg9tSuc+43wMltnHBG6j+6c8z0mrzeuvBimXppnrX7Y26JOTGkMY kHLwDHsZ2JiRAxK2RCXA/EtM+t738uVN83absrZfgEaFeRYZyPNclJMDg6OQJ+kIHeTD 6//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=V7dCkUaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a17090a899100b001fe1c9436b1si5674480pjn.86.2022.09.22.07.05.44; Thu, 22 Sep 2022 07:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=V7dCkUaS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231846AbiIVNyA (ORCPT + 99 others); Thu, 22 Sep 2022 09:54:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbiIVNx7 (ORCPT ); Thu, 22 Sep 2022 09:53:59 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99766CE1B; Thu, 22 Sep 2022 06:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663854838; x=1695390838; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TGRlhzszJtskHi6su65+eCvkVyzU5lO4sziinuRy1JI=; b=V7dCkUaStBQKhycSOnd2teEgDfW498ymR6hXLVEhgUPWj3XbRPsIbC0q 4f+Lg5o1XX7KHhbYmPLRT1/G5aRdIOD3+3ydFsCgN6GGRJmQrHHJCcv9k f0p8huwOmab8eJpiM+D+9LS5ijgPrgSL9VJRN7OXigXWcU4c2QqpptEag y0sQ20ubGlLc+l9oLbpo4X+8alMJMSignCaAw5Bim8Xyw3WlXItEiJ3fv kMCQMNIZ62URCQXJuPKrQflU2iK5z1MesPN4Z54ZUJgdwwwwRFZ10aB5M uOPUM9rpXRRAj4mh3bzxGVSjdl3GCfL6Z03/pa+ZBvm9Ph70pSVa7Gnak A==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301710563" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="301710563" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 06:53:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="723669359" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2022 06:53:55 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5C2D3238; Thu, 22 Sep 2022 16:54:13 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , kernel test robot Subject: [PATCH v1 1/1] device property: Add const qualifier to device_get_match_data() parameter Date: Thu, 22 Sep 2022 16:54:10 +0300 Message-Id: <20220922135410.49694-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add const qualifier to the device_get_match_data() parameter. Some of the future users may utilize this function without forcing the type. All the same, dev_fwnode() may be used with a const qualifier. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko --- drivers/base/property.c | 4 ++-- include/linux/property.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/property.c b/drivers/base/property.c index ed6f449f8e5c..4d6278a84868 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -17,7 +17,7 @@ #include #include -struct fwnode_handle *dev_fwnode(struct device *dev) +struct fwnode_handle *dev_fwnode(const struct device *dev) { return IS_ENABLED(CONFIG_OF) && dev->of_node ? of_fwnode_handle(dev->of_node) : dev->fwnode; @@ -1200,7 +1200,7 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, } EXPORT_SYMBOL(fwnode_graph_parse_endpoint); -const void *device_get_match_data(struct device *dev) +const void *device_get_match_data(const struct device *dev) { return fwnode_call_ptr_op(dev_fwnode(dev), device_get_match_data, dev); } diff --git a/include/linux/property.h b/include/linux/property.h index a5b429d623f6..117cc200c656 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -32,7 +32,7 @@ enum dev_dma_attr { DEV_DMA_COHERENT, }; -struct fwnode_handle *dev_fwnode(struct device *dev); +struct fwnode_handle *dev_fwnode(const struct device *dev); bool device_property_present(struct device *dev, const char *propname); int device_property_read_u8_array(struct device *dev, const char *propname, @@ -387,7 +387,7 @@ bool device_dma_supported(struct device *dev); enum dev_dma_attr device_get_dma_attr(struct device *dev); -const void *device_get_match_data(struct device *dev); +const void *device_get_match_data(const struct device *dev); int device_get_phy_mode(struct device *dev); int fwnode_get_phy_mode(struct fwnode_handle *fwnode); -- 2.35.1