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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34CE6C5479D for ; Wed, 11 Jan 2023 15:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GAHRJ4IdQDgAOUNOjaoEzsxziN4FUo1DREiLObp+hU0=; b=B9HdNbIUe0+RRe LX+Er3NpwZIEfJW/BEiXg4eu316uTfrCbwAupoBFo+dkbKQmPMyUNuhQl+NuUwb6fp8huJrwEY1HE RJkoTm9aN25kA3+6DZqLNwc8PIfEfbzPDGZhhumisXT/m4tDvXeqr2pBIwkQDQ5dAGL4qsIO+N8KA 1nw0um5AGkRU7CCaN6OwwITmvCYgdkuxdIog+QRNsJqwDbLtP3eb+y81t93FDJIRwxr87bHxkmfct vCfbmSQDsaWDLuROvfq+wvas48Icu/2A2sIaEHYnk3f7S2QhzHLYnU/7GawbTAuq1S6UgkJLdhn/E oqF15SG4g/y/X8/FgF4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFczT-00BzDc-7g; Wed, 11 Jan 2023 15:26:11 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFczP-00BzCb-VJ for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 15:26:09 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id 231E561D68; Wed, 11 Jan 2023 15:26:07 +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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230111_072608_088006_C3B4DC34 X-CRM114-Status: GOOD ( 18.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel