Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp849484rwr; Wed, 19 Apr 2023 14:12:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnndsREsCIgy4SqWk2ItETLCjYPoacBbAN/4p6bQTyh8NiBTmWUIYFPpi0cAcrosAiLRUe X-Received: by 2002:a17:90a:5d90:b0:23f:2c65:fab7 with SMTP id t16-20020a17090a5d9000b0023f2c65fab7mr3946996pji.42.1681938744210; Wed, 19 Apr 2023 14:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681938744; cv=none; d=google.com; s=arc-20160816; b=OjzfX2PJXUuPgVKqYwUeO0Y6XCbXvznJnjobMBsVNOK5STRLXgDgrNTqVlD+6ooUhS 3CEHEHDcuCHS69Nt5bgnyQRtSJEjhJEsJm5ShFJWymgY7mX82NIoiCHOpW78sPLs2+SH eBK6B1/LweHRj9Pa0ghoBLAARi040Tac73MekJtYbXFNG6nHyC/G3xBIrNP1/eFGiywe NEWmVDABtx13Fm6XxwED8RaGqRzZIDzHobL6OR3X8Q0FRDO7M2aTBERd6ULN72XDz89X x2rABMdjmkLCMkdyPpDtrkd1iZEAY7phhYsORDQHm0aUChclkO6id0B6zPzEuhNb8N2J UqJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FKjV9q1W+gLah2WoicWn+Klrde73Mv988bIUWxAX45g=; b=rIOfMQSGN68OdgW20+HV6Ylrd4okhAyIGXA/dPGZkjF3fWuVrtWGP8U6AzbjezLezt 7wNyjqV+0Wlq5K7j6JCmysYRZEOKVYoNEEqwyCu+QEZHGD8GjWqLRmC+nhWyxhK2E09X aA0u2264d/jaHxr3VdWvzNsipcAI8HGdHUh6BglLXFmjRtMsGBU9xWuYFXUyGziSojN8 qqOl3IUSRzvShBE2dzQ/g63hW9T0dIz6f5evw9aYjQ1UWgKIzOazwPzgOX0py7H+E1Vl WrICmqtnU3jFdnZyDJRkwi1pHS6/4WvxUQGpsDSWLKYT0t9VaTDfo3zb6o6RD6NZrntZ V0Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UAymgX+S; 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 lx13-20020a17090b4b0d00b0024988ecf24esi2378100pjb.150.2023.04.19.14.12.10; Wed, 19 Apr 2023 14:12:24 -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=UAymgX+S; 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 S229793AbjDSVL0 (ORCPT + 99 others); Wed, 19 Apr 2023 17:11:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjDSVLY (ORCPT ); Wed, 19 Apr 2023 17:11:24 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38D4D3A81; Wed, 19 Apr 2023 14:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681938683; x=1713474683; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1hUN6Aknab0oQQIjZ84k+50reseqSO8Xakk3s4YgMkM=; b=UAymgX+SfNsQ6LnvUk6dEGs/lj0noNIV2M6OFFMtYNPF8OSRaITKasLT BzIBiL6F7WO2+EuK59fi8iycxtc+fT4ANtLLHUB9ohGAjciCh8GIHHX9f OMYS/5G5J4FJI+ziATzflyA9XuJjbCVyGgTI6h0Ps+QXvXqL1v/yPaeWJ XyBE00UHm+h88A74nj0WRZb+49ZytJIglkDs5bIhYS14KzKrYZPBDR5fs FosS2wUoCN8aSe3FyigRW9AGHBhzXXo5xsHtwB/8u0BaU27FunVx6qzXY PttXa8EHf0LhPvJf7Y77cPk/0u4TcQBtrVmSvcrsmIyTe18cZ8rcIknWx Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="344311971" X-IronPort-AV: E=Sophos;i="5.99,210,1677571200"; d="scan'208";a="344311971" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 14:11:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="691653762" X-IronPort-AV: E=Sophos;i="5.99,210,1677571200"; d="scan'208";a="691653762" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 14:11:20 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with SMTP id D5B65120D2E; Thu, 20 Apr 2023 00:11:16 +0300 (EEST) Date: Thu, 20 Apr 2023 00:11:16 +0300 From: Sakari Ailus To: Guenter Roeck Cc: Greg Kroah-Hartman , Andy Shevchenko , Daniel Scally , Heikki Krogerus , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: Re: [PATCH] device property: make device_property functions take const device * Message-ID: References: <20230419164127.3773278-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230419164127.3773278-1-linux@roeck-us.net> 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, Apr 19, 2023 at 09:41:27AM -0700, Guenter Roeck wrote: > device_property functions do not modify the device pointer passed to them. > The underlying of_device and fwnode_ functions actually already take > const * arguments. Mark the parameter constant to simplify conversion > from of_property to device_property functions, and to let the calling code > use const device pointers where possible. > > Cc: Chris Packham > Signed-off-by: Guenter Roeck > --- > Found by Chris when trying to convert a driver from of_property_ to > device_property_ functions. I don't really see a reason why the device > parameter to device_property functions should not be const. > Please let me know if I am missing sonething. Thanks! Reviewed-by: Sakari Ailus -- Sakari Ailus