From patchwork Wed May 10 15:47:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 9156 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3736892vqo; Wed, 10 May 2023 09:05:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QBLgXl/Z4u2g7KgrOfFyLMqwaCrRE2bUd2VYpARyHCh3NSTpvu1qKCu8G9WTZ6PUlaVBT X-Received: by 2002:a17:90b:1d0c:b0:247:1997:6a1f with SMTP id on12-20020a17090b1d0c00b0024719976a1fmr18981309pjb.12.1683734705599; Wed, 10 May 2023 09:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683734705; cv=none; d=google.com; s=arc-20160816; b=tIqyo3mY//XXokucLFN4sT2babi4xq+RUAY8fyNNZ7N9izl9IXmb4socbdBdYXSVI8 Wie5WC5pa2qfYPpQS7ueLSBmJnu8Sjed5+9Z6JrOY2BAakM+pTv1F1Sj3/3QJofKkDdd 7FZWrBzQbBl3MVkKfifCzlpvsl6/Z4eh6/JYdgedwDEl12ceTUhtF/mZOcC4NekrsKvM LRU+E+yTXofoO+w91jCxSND7zYAV+DbAKic7FowNbc1RpvGSt2s4N0eHeQDOcxLc9j+L MbwVfiLn8v4VUK04OoJAE4jIiWOdMGSCe2XgMHJITtF8SQ8BLNHZKfYa0pBxykpbiuKr sM/g== 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=WoIOANVWdL0y5NcqhIK3a/G8U5mkm1Ghbop7k5ySOhk=; b=wjyD+bkSXavcbr6qBYnAIT0W1/lHnFJw300nHVRKU9mOGYioDoev8J1VbXLUMfxH85 ji2BpYnQSo60Qv871CiWtVXQyTh5mrh9ligjMrKaxxPsgi0KNGG+CagyZKsLVMi0MlAT IFMsgV4cJ+gV5EZAud+0KgIlEmlKzTEVeE5PP07HCcPaYm8n6KekgZJJ20llXNg8xpZ7 VV5YhCyS8RuM9WKZhPUi0Rq9JC1bP5T5Q8Kl/XYmwTASwjenAifPZmGwwsie2qDMBibg KlruKlE1gjuAgsshMhhrGG1dBoZoqNd/PYj0nMrYC3lVY3powf+oe3fZz3d+rBfNLfhC UAiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Rd3d4ufk; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj4-20020a17090b108400b0023699c44b66si24054730pjb.167.2023.05.10.09.04.40; Wed, 10 May 2023 09:05:05 -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=@bootlin.com header.s=gm1 header.b=Rd3d4ufk; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237357AbjEJPsL (ORCPT + 99 others); Wed, 10 May 2023 11:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbjEJPsI (ORCPT ); Wed, 10 May 2023 11:48:08 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6CF494; Wed, 10 May 2023 08:48:05 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 70F2CC0008; Wed, 10 May 2023 15:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1683733684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WoIOANVWdL0y5NcqhIK3a/G8U5mkm1Ghbop7k5ySOhk=; b=Rd3d4ufks9H8+MFvwd9uWILnq9BHpac5TSVlyaIfx5FiU+NOdCVUKjT0oc43j2oZegyNzn BXnSqpoCr02fjgy25wvCFPaWqaRviURasbmfeDG0aK0GymSBFrrPX5BuKixDem2XayZoF8 e5h19iXJm1R87Udx6qlnaYHq9O3zX7RGmXDndSidb3ecZl9f9L5fm2PLqz9JRK1GMG7sZL LaSGFiqdSTwBRmLAIIJe95eA+Du/FtrlAeKDgo/6wW+jIf3/VJpqbAc+CKjlFZOwqn5W7G FfVITgIQ8gYiM5kpYG6EWtadeSaHh2qReOLzrOm02Aoov7drJtk/GPiqPEfcQA== From: Miquel Raynal To: Rob Herring Cc: Frank Rowand , Thomas Petazzoni , devicetree@vger.kernel.org, , linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, Thierry Reding , David Airlie , Daniel Vetter , Mikko Perttunen , Miquel Raynal Subject: [PATCH 0/5] of: More 'device' vs. 'module' cleanups Date: Wed, 10 May 2023 17:47:58 +0200 Message-Id: <20230510154803.189096-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765523802665758605?= X-GMAIL-MSGID: =?utf-8?q?1765523802665758605?= Hello, As part of a previous series, Rob suggested that keeping too much logic in of/device.c was backward and would benefit from a gradual cleanup with the hope some day to move the remaining helpers into inline functions wrapping the proper of_*() methods. Link: https://lore.kernel.org/lkml/CAL_JsqJE43qfYzHUuCJsbaPPBTbYX05Q7FFmPTjPFZ3Dmz_mXg@mail.gmail.com/ A few of these "conversions" happened in the series I was originally working on. At this time I actually wrote a few other changes, completely unrelated to my original series, but still following Rob's cleanup idea: here they are. Link: https://lore.kernel.org/lkml/20230307165359.225361-1-miquel.raynal@bootlin.com/ The last step of this series is to actually remove a copy of one of these helpers which I think is not needed. This drivers/gpu/ patch depends on the previous changes. Thanks, Miquèl Miquel Raynal (5): of: module: Mutate of_device_modalias() into two helpers of: module: Mutate of_device_uevent() into two helpers of: module: Mutate of_device_uevent_modalias() into two helpers of: module: Export of_uevent() gpu: host1x: Stop open-coding of_device_uevent() drivers/gpu/host1x/bus.c | 31 +++----------- drivers/of/device.c | 90 --------------------------------------- drivers/of/module.c | 82 +++++++++++++++++++++++++++++++++++ include/linux/of.h | 21 +++++++++ include/linux/of_device.h | 39 ++++++++++++++--- 5 files changed, 141 insertions(+), 122 deletions(-)