Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9653849rwl; Wed, 11 Jan 2023 08:17:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLN3uSqW5yMRrgt79F4nxo0LWfUSI0+tX714omO8aSRjeEyu0chFWSdeEvvngw0CfHZp68 X-Received: by 2002:a17:906:d052:b0:7be:e26a:6104 with SMTP id bo18-20020a170906d05200b007bee26a6104mr63997031ejb.52.1673453856136; Wed, 11 Jan 2023 08:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673453856; cv=none; d=google.com; s=arc-20160816; b=XeyQH2DMOBjcR53OOMPHwpYTTTgUjkNZv7Gz1JgeLeUOxe53SxXLgAfug5RK6hpGjX gZlwB3QE9bef4BXsCVFbQ9o7TLNyltetfghUowEkfFPA2WjulUSjw3uBOTIi5SRNWF6L Femv+12m6VCfbNqMPqcZ94JDrgx7SBN9KUCnZKcgMP0suqxJBBDrHlzdBET7xRFZksva Wp4uxMEIHnom3g9PB2zCbSrBe6bMW88Ade/FKogNci+W3ebL4j6DE16J5zdskxq6nFOy 44rq2QylW1QxZ+obvRfNX9NIDe3d2lQpDN4iG7WT+xbVGC0SWD0coxax5p/ZcP7HpH47 h67Q== 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=gBsXDTGDXhpugcLqs4Ig3UNwoJR0HOktQK6+J7hsN/c=; b=ktUeeNvZlAeRIV3Rjphnkej55a42J0KrXGbisyCwhxE+Y2ZRW1SbFzU8+6DSNxivWS yKZcIIJZzS9ij4fuxzpdlp7bOJm6n6W0Nrh1tXIuw41jI36I88t76F08TbdkDkCeEKPA Y513H+EfdHu8fUPLAP+SskIkLUe9TkB8VXdx+Jaf/pDDkEWNNfYbdZ98aj1PSP0skZA9 gd24e/3kUFQWmapYOJNFg9DitGEE96CNTNEVOqo+xwXq9jUg1bj0LH6NpAC9FN8R9YUL nrBxmI9LGG2jkMiIS7txNHnooNZsVUpTt4IifRJwzr94COT9fSN0ZsdrOLcyNA+G3hwg hIBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2JdBpA+L; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id va28-20020a17090711dc00b007addbdb9fbbsi11430642ejb.558.2023.01.11.08.17.23; Wed, 11 Jan 2023 08:17:36 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=2JdBpA+L; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234822AbjAKP0R (ORCPT + 51 others); Wed, 11 Jan 2023 10:26:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239002AbjAKP0K (ORCPT ); Wed, 11 Jan 2023 10:26:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52592210; Wed, 11 Jan 2023 07:26:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0ADD3B81C24; Wed, 11 Jan 2023 15:26:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 090C5C433EF; Wed, 11 Jan 2023 15:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673450766; bh=U2f1tKBJYlfCEhxdorOo/7D7jHkArttEmitpGOp2Svk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2JdBpA+LJYDToIW/T9oIkaa9WSBMHcR4IoKgqdUF1upb4E9cDXTvK8C62GPzc0HfY gQcrMsyJFyBFo/c56qrujWaLIL8fcladaOAVrL04f1NbeZrTpn9salym/F6dY56jxG wVYd8v/wQaeKtWH57V2D397lY0l7rybUL325lLBY= Date: Wed, 11 Jan 2023 16:26:04 +0100 From: Greg Kroah-Hartman To: Rob Herring Cc: linux-kernel@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , David Airlie , Daniel Vetter , Benjamin Herrenschmidt , Frank Rowand , Liang He , Thomas Gleixner , Christophe JAILLET , Thomas Zimmermann , Dmitry Baryshkov , Douglas Anderson , Lyude Paul , Corentin Labbe , Zou Wei , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 01/16] of: device: make of_device_uevent_modalias() take a const device * Message-ID: References: <20230111113018.459199-1-gregkh@linuxfoundation.org> <20230111113018.459199-2-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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, Jan 11, 2023 at 08:54:04AM -0600, Rob Herring wrote: > On Wed, Jan 11, 2023 at 5:30 AM Greg Kroah-Hartman > wrote: > > > > of_device_uevent_modalias() does not modify the device pointer passed to > > it, so mark it constant. In order to properly do this, a number of > > busses need to have a modalias function added as they were attempting to > > just point to of_device_uevent_modalias instead of their bus-specific > > modalias function. This is fine except if the prototype for a bus and > > device type modalias function diverges and then problems could happen. To > > prevent all of that, just wrap the call to of_device_uevent_modalias() > > directly for each bus and device type individually. > > Why not just put the wrapper function in the DT code instead of making > 4 copies of it? I could, if you think that it would be better there instead of in each individual bus (like all of the other bus callbacks). This way each bus "owns" their implementation :) thanks, greg k-h