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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FFE2C636D6 for ; Fri, 17 Feb 2023 09:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjBQJrb (ORCPT ); Fri, 17 Feb 2023 04:47:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbjBQJr2 (ORCPT ); Fri, 17 Feb 2023 04:47:28 -0500 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2053.outbound.protection.outlook.com [40.107.96.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C13743A9A; Fri, 17 Feb 2023 01:47:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mqni6B98cvZqyC2xas9AgQiu6HdO/b5c8bkqThE9zE6CCKggTcwc39tlY97GTGnQ82fj9k5HNULpi8ugC+n0mWtH7Hv+ruBZOqxH1Jeb9HUmtwmVW2P4ViXbQdrzT880xBWSdqOC/0DPwqATYCH34e9ShntOYYcQfvK/VOCtkqquNQ0aqmQYnZocPWxtw2uw0KSOie7hozNG365Owz447iUia9CPB+sCeQQy5ZEfQoxCAWULBaOX+/pfIFKpBwUdYbO5tpmKPF64jAa4aDC4hBZPqBh7htLoLlwJ+msJ/oe9BlfgHDx2yfS2Jy2ldmbPlp9IXgJTXzu/AWMFYW7B6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jrn/0EE9gd0AWa3R1I6j2qJ9knmQ8RF9AE1bCIwlTPg=; b=a3woX/Zqh4DfZRW2A47QKAxI9ZT/sYe2jSMfjAR4Z/uVDOuhwUW3qbExFxilCVLNEzhk8EoihjDsJAQ1up9wux0E0Ikoglxeuti1zt4spitxfVWr2o0B5qdFtq4CNQZMzjjUxNif1nsQfgb1RvQLMx525SHKBYdCqZbd1wAJyfQPRZFDydpY9zalZ8OrDpA7N7a1RgxdhriD7A97xKWDG4Uqr0Oc9lGdGBb6KXC/RRMY9ou+C0wj5UNOM6k5l/NYBOB9J2JlWBy/9jK6I5CK6OQdVaedHxMAwZ25OB8rGqu7PJzHZj+Yi8c14AD1VvTvAPqFKNeZtDm2xgCXDggXUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jrn/0EE9gd0AWa3R1I6j2qJ9knmQ8RF9AE1bCIwlTPg=; b=JRZxlOAKMsFScloqaD8Ty2DK/TqPiPU987XkniwNNWPWkfwfe2X1wzImSen1r0LT6q4d2ivma8wJbxt6ZJAeipIPVSw1JazMwHgqDIgidLfHREgFNCh1Ge5PbO912XwZt3tA7lCspbE474GR/XuEFzBCsa7ggRaCXb8mRSDfo4Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by SN7PR12MB7956.namprd12.prod.outlook.com (2603:10b6:806:328::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24; Fri, 17 Feb 2023 09:47:25 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::2e4f:4041:28be:ba7a]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::2e4f:4041:28be:ba7a%6]) with mapi id 15.20.6111.013; Fri, 17 Feb 2023 09:47:25 +0000 Message-ID: <9efa30b4-5a6d-91b3-617c-853f0ac0b22e@amd.com> Date: Fri, 17 Feb 2023 10:47:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] dma-buf: make kobj_type structure constant Content-Language: en-US To: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= , Sumit Semwal Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org References: <20230217-kobj_type-dma-buf-v1-1-b84a3616522c@weissschuh.net> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20230217-kobj_type-dma-buf-v1-1-b84a3616522c@weissschuh.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR2P281CA0003.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a::13) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SN7PR12MB7956:EE_ X-MS-Office365-Filtering-Correlation-Id: a91e2dea-3241-45f1-e361-08db10cbf97d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2WsyeKPUNWJ/Hr+DZ3HeS1yMhdT9eQmgRpms/2aJ4/DuV0fN8wSKzWOFyNbUHH7jddugFEwgU21DOfGEZyZU6XFUCLtrVTX/OmDsnqw08wIGOx+nUwWUP4+4fTH0aCDK0g5AXNTbb+jrIFtmr9J8+FXTIh3Q9vzVgeRHuQL3sCiDHqymXts9m3YDPw284vVFVqo0qFeU0Hs7zGftJVSdnwmo6Yejk/hvf/F/05GIIe6m1s77aWKvvsMsiSF1UVwra/aJCUstE13py6L805p/O+JPRNemiIGJXT8GgcEGpVh+DdFKK06sa3hiE8SyiTWRg6xBxn7aecDdnePAo5KKZGeGqUAQC7E5J3jTSOZWEo/nfhzLaRuc55keHMU3lvwHxJnDcoggH8iIno7m1XH7UktdbqZC+crsmMe9vCgETQaGzUC/oQnyep1Fi9NUVDwoUNTIJ5ECFLlWxoQdiZszuL7edVdljO41a7PW38Vo+LD+So2WjIUEegJMau7h5+xelRJj5q6QcxIIfbnvdvNVdJ8iSBmAeBzFSfAncuGkzAfgbfvScUKfB1RzE1L+fitcAFJzy9gtO34XLsDZOd0knnetS+a9ntcngfcvC2Lg7lXuguHazW+OV7LOysPB/zG5zaJR/2Sj7n5wdgJz6juebSVtxUSMq44t15BrMH1SVOkzqRjMfVTkRTm3wOxf0+BbHu7pfyXyzCHd8h/bpVpzbC6ET5w1RMTB9jY/IgBRQeQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(376002)(396003)(136003)(39860400002)(366004)(346002)(451199018)(2906002)(6666004)(8936002)(31686004)(41300700001)(66556008)(4326008)(66476007)(66946007)(8676002)(316002)(110136005)(5660300002)(6512007)(6486002)(478600001)(36756003)(6506007)(186003)(38100700002)(66574015)(83380400001)(86362001)(31696002)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?My9MV3R1aWlOMi9hTlpRYU1iWVE3U0pKN2dMNTlzZ1VlZmFyY3o0Zk9TV1g2?= =?utf-8?B?K3QveU5CMXNCRElYNmQyVkJCYVI1K1hpTUhpWnNtL3J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TBXV3RyaHl5NGpkWGRYWE5POG5SY1VxTThmaElKUDkrV3U5?= =?utf-8?B?RCswbkNNTjllcHdrcTJYblFzekY2MHU5SitJTVdydTdEcXhXZWJHZFJZbDQ3?= =?utf-8?B?M0tiMXFucjNqOE4rNlo0YnQ3d2hwb0xWUmhJVDlVOERCUVRiY29Wdml2anFM?= =?utf-8?B?M2pLZG1MYzNhdDFYL2lZa2hnM2Y0RUFGVWxMK0J4UXV6L0pXcVBVbkNMbjJx?= =?utf-8?B?bnlVVFg4UUhLcXBpWnlZS25MSkFBMUlvL1A4aUkxNXB6Ui8vVzdyS3NKSisr?= =?utf-8?Q?tYcki4r2bbt+qgP39Y/qvB9uvujY80Uygfw8UihmHF9m?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a91e2dea-3241-45f1-e361-08db10cbf97d X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 09:47:25.5583 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BgEiSPYFuZkpqQ5n1eLFRCL6WzPcbBW7nkoKlPIU3Dbh9BaLF28zcPEe2cvwMFIK X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7956 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 17.02.23 um 04:13 schrieb Thomas Weißschuh: > Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") > the driver core allows the usage of const struct kobj_type. > > Take advantage of this to constify the structure definition to prevent > modification at runtime. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Christian König I will pick this up for upstreaming through drm-misc-next. Thanks, Christian. > --- > drivers/dma-buf/dma-buf-sysfs-stats.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma-buf/dma-buf-sysfs-stats.c b/drivers/dma-buf/dma-buf-sysfs-stats.c > index fbf725fae7c1..6cfbbf0720bd 100644 > --- a/drivers/dma-buf/dma-buf-sysfs-stats.c > +++ b/drivers/dma-buf/dma-buf-sysfs-stats.c > @@ -112,7 +112,7 @@ static void dma_buf_sysfs_release(struct kobject *kobj) > kfree(sysfs_entry); > } > > -static struct kobj_type dma_buf_ktype = { > +static const struct kobj_type dma_buf_ktype = { > .sysfs_ops = &dma_buf_stats_sysfs_ops, > .release = dma_buf_sysfs_release, > .default_groups = dma_buf_stats_default_groups, > > --- > base-commit: 3ac88fa4605ec98e545fb3ad0154f575fda2de5f > change-id: 20230217-kobj_type-dma-buf-a2ea6a8a1de3 > > Best regards,