Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1410409rdb; Wed, 24 Jan 2024 14:44:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHo/xuEeVDdwfa5u1pyenJz2ydaoC+eB6vBI377/qA86ABtxG9/s0Kujw7ECl+LjEoVhtTb X-Received: by 2002:a05:6a00:1901:b0:6dc:c49e:a7b2 with SMTP id y1-20020a056a00190100b006dcc49ea7b2mr242815pfi.45.1706136282632; Wed, 24 Jan 2024 14:44:42 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t1-20020a056a00138100b006dbac97dfccsi11960195pfg.141.2024.01.24.14.44.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 14:44:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gZbU0dR8; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-37759-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 45EA0B24434 for ; Wed, 24 Jan 2024 22:38:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62918136670; Wed, 24 Jan 2024 22:37:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gZbU0dR8" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 482DE13666C; Wed, 24 Jan 2024 22:37:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.10 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706135868; cv=fail; b=PDDqKWAa1cBdWzmCa6Ate8fCiYd9g3n68TQ8jUfDYlrew6w2C+LAhNz6zFNbB6E78yEhn59lxO9LBxkdD+ucuoptMiYTLW/mrwl2b5ylkIcots1h8JCud7O1OkF3JkOYSq1dVrPolLZb2eB9+kBnTRSUH3DKzKM9JaeI4K8QgyU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706135868; c=relaxed/simple; bh=vJ8t7RNedy3OI+ybC9dAk0r2dz5Hz49O7ZBJVz1Fm5M=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=oQfhNc0AQ7bi1V+qRHNYU7aLSL42lojWEG9BwTuSHbYHIMVHov9rSDWJ9vnOvzW3B9sRa4VSbSfeOSXM3D0Ky1Zipo2UeApkUJckxcv9vKDjhH+JSTK4tu4IhB8KduPHso9SNgJCKVh+sZTZlNXVuFNuIYae9PirDXrtsj+N34E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gZbU0dR8; arc=fail smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706135866; x=1737671866; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vJ8t7RNedy3OI+ybC9dAk0r2dz5Hz49O7ZBJVz1Fm5M=; b=gZbU0dR8904lMfz5PK3A6LjzKRzF3DykDHCs5b0vprsmrht0Di2mkZpo 0C32b78CT4aPcw5cEYrHpOO4j8eZB7IpG8Ih7oHUcdpaTTUzgdBZJW/5S 1dphwrbGVlfjG8q6mNNYEGoO2H3zYVJBoBJBf8TJiY16Rm8eArGK3vyg+ Xz1MQPnnUlwNo4hBlqpALefP7hcQ18BFRO9KA/bhsRT075TuJQ1whz8wv MwUVEMUYAt68YRE2Ms64i3Ah7O3kqYAPsVSaaVs7rOF/BN+E8jDez4pci NfJ2F71giHm8p5wzf4haf3G7PpTaw35RZKMOXqj5nUyUY+LKj3FUG9ZV6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="9375905" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="9375905" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2024 14:37:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="876844292" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="876844292" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Jan 2024 14:37:45 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Jan 2024 14:37:44 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Jan 2024 14:37:44 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 24 Jan 2024 14:37:44 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Jan 2024 14:37:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iEU2XrM2eXMKNmKTrxk8H0enMOvXyIcsZgy86WMGKPYyYGa6VBNUoE7T232YAEpj064TRbU24h/YT7KdL5Q0KKuq57hZSCghjeimWVNzq6vvLcBp2EipBGoVTQcSzyYYhEnj4UOj8fA1jbuzYP0YFWo5VCSABM4PiGnfbUYhwSWQWFpl50AIm0zCpFBcfpqcQNaUAs5RrhrqxrXhvlZKYUiNeOiSZIklr7Zv8qodOAQzhN+aPL9YCHpEwmVPeUCDQ2VtxNrtWgH7cXFFIHUikDlocehTGJB07DlEGeBbH1m1we5Vue+JrrAmqVj1z/UsD7rtiVJJr0rprwrMI+6FSA== 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=aU0qwAWPXDOHvNk6VvARR78uMLoIprouoP8acCNUdiw=; b=kuIoelG8MQFzHem/A/6J7cRazN2eU4srod5RDCop8O00QGy4+B3xbnfKCDqbuNogpKNRTK5zU1+DDDq/gkGoovGfkDM6qs4F9pWm74sTilEWpcD0yaK6+IzwXWf8f7IKG7WL/UxzQyQ0Px/f25SGH4LAQR71bP6DuRyLKoam7qynmCro8bQ63l4st4wUIpCDGdjcaC5eNxdCuv4v20tKaJ8IoYWM6lHts9/8gdvrdAks2EZ7SQleKxoxnL5Z7H0818HWt7UcBfKBIg6DcK7aPOPRAMO25cPvbXzrnfIdlg3Ez7YTOtbaZrrAoN33VlBPQvSHdKZPWHrU+b6XQ2LNbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from IA0PR11MB7185.namprd11.prod.outlook.com (2603:10b6:208:432::20) by SA0PR11MB4592.namprd11.prod.outlook.com (2603:10b6:806:98::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.39; Wed, 24 Jan 2024 22:37:36 +0000 Received: from IA0PR11MB7185.namprd11.prod.outlook.com ([fe80::cbc8:6370:5df2:b2df]) by IA0PR11MB7185.namprd11.prod.outlook.com ([fe80::cbc8:6370:5df2:b2df%4]) with mapi id 15.20.7228.022; Wed, 24 Jan 2024 22:37:36 +0000 From: "Kasireddy, Vivek" To: Andrew Davis , Gerd Hoffmann , Sumit Semwal , =?iso-8859-1?Q?Christian_K=F6nig?= , Paul Cercueil CC: "linaro-mm-sig@lists.linaro.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-media@vger.kernel.org" Subject: RE: [PATCH 3/3] udmabuf: Use module_misc_device() to register this device Thread-Topic: [PATCH 3/3] udmabuf: Use module_misc_device() to register this device Thread-Index: AQHaTklTbYB3YNw8AkevdQa0HClb0LDpjxhg Date: Wed, 24 Jan 2024 22:37:36 +0000 Message-ID: References: <20240123221227.868341-1-afd@ti.com> <20240123221227.868341-3-afd@ti.com> In-Reply-To: <20240123221227.868341-3-afd@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA0PR11MB7185:EE_|SA0PR11MB4592:EE_ x-ms-office365-filtering-correlation-id: 72509d9c-2f6c-4431-d989-08dc1d2d1075 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cnuhEP8HFBeY7JGsTTpK765qRWb7MZYPQH1/vsBiA2jhANeSfwR9Ku4rNW+fsqUUbnx5OREA0NvIEQIMOI993vYlBYLrfBT0WGMe6ZAKaWYxL1nuQkLRH+ssNXILPNqov6Inai6OJlLEBIRoIabiXV4AdySoYALgUdCeARZbTWUTMcBBsROqIpgp4+033eEx7j/VD6FxYteaTOw/iIUBJeYEM2vCz00rUj4ixyWyWpQNavK2ArJYI5Yf3Mi14vsjYzqH6fyxBsfep6RLwhHpUlyIWNtWegSitBu+nVbISaOr2U6wfGqMH3p0HMdGErjVavTSIus1MrJEz+o2CtURGNf0cnT0SB2tkiALJDU+8u4uzVqaXcglxEfJZ0iZuH7FannxoE4w8JKDZgvbitVyHPr/Zp5lD9+AK1yXTm8GTvRRTIa8Hie4TPmbzx5hSk+ecIjje++At/ePbmEC1uSv1M4g638WcY5ciKIko98fxPikIYVrancmpkWSzdmdmB0BvrCH3kE+LXas8KQYXF0iq6Wz8OHZmaZ1i2M/vSs5yJVdcx6kPPwZ+QxfEg3vlB1dQxeKicti2Ag7bZhiD8UDDJTz8od1/TroX0xB0KEFww7G7c3c3XrX0jXKVIpenFFM x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA0PR11MB7185.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(376002)(136003)(346002)(366004)(396003)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(55016003)(83380400001)(41300700001)(86362001)(33656002)(82960400001)(38070700009)(122000001)(38100700002)(9686003)(2906002)(26005)(71200400001)(66946007)(66446008)(316002)(64756008)(110136005)(6506007)(66556008)(4326008)(7696005)(52536014)(76116006)(54906003)(66476007)(478600001)(8676002)(8936002)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?9MOIZudVVNHug0posfUbn9pzRx5tofKsdX2Ntr1AnepfxhYN2MTlsjh4o3?= =?iso-8859-1?Q?n42nZErG1+xMXB7e2mG8P0SW30TjcUQ2IzTKSQt2mV2mfqmPjmy8nESH36?= =?iso-8859-1?Q?Shdi3JAe5Tl9mm5NUYa9Hzci0xKFhJ78SpW6L7/1MrRn8CpZjaudTrgYB5?= =?iso-8859-1?Q?UO3OhJ6+Ddox3DBckaWqcWmNMPrhSSnbvkvf011aOee2bH8ZBXyX6RgtF4?= =?iso-8859-1?Q?LKLIKnLIcFCaXj40iP+MfbgXINTc4+FWXHVMhkG2rMEzoGPC7whJ+OR0x0?= =?iso-8859-1?Q?S5G7IsK5jiefevxRYIaoRWUHzo93TGrG/LKg/mPPm4V5Hc+in0SUnfzldD?= =?iso-8859-1?Q?X5KdKwny3N22SWmpOHRvDhuznKW6ZZQemce8sLLsEa1rL6LXvT+nFqpTWG?= =?iso-8859-1?Q?lHW1RNHnNnxALRdjVDTtiT1eHF2axxBRDlbb0LvPEqadTf+P1WHtQT/GMl?= =?iso-8859-1?Q?xrHQeUnhNfcln+Hvf/JSzd/UYULMtGuHbZsRNXAS8KrapDLvdu3593aMHs?= =?iso-8859-1?Q?KjbfKCKmM7+eqlYAvM2hU36XWxRjOROFmY5mMghcZz5KDk5/ZqswWauuUi?= =?iso-8859-1?Q?JnI2o+LPcwiMj1ZUQy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-1?Q?/HlEQhbpOtzSwWzwpWpDQgFzT2QMjCryyQr526faqgqbJvDv6rRm+Yj8TP?= =?iso-8859-1?Q?ysoW9AtyMZmLmUb+O/SmU0D0hp30wWqRx0Z41IYrPEuGJj5VAyvEJeN0aK?= =?iso-8859-1?Q?BCd+WDo4NAXp1D78oDL+KXQxz31V9vSkW1?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA0PR11MB7185.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72509d9c-2f6c-4431-d989-08dc1d2d1075 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2024 22:37:36.6153 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qrddnmXo4W1xU+84KQMKV1vfVlFpo1rpFClrJajWuZQGgpdRjXigRPFSFCzaE1DYm0+997Ff1w0NhfWQxMyU0FndX3pIdk6/Y0tciYgbGhE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4592 X-OriginatorOrg: intel.com Acked-by: Vivek Kasireddy >=20 > Now that we do not need to call dma_coerce_mask_and_coherent() on our > miscdevice device, use the module_misc_device() helper for registering an= d > module init/exit. >=20 > Signed-off-by: Andrew Davis > --- > drivers/dma-buf/udmabuf.c | 30 +----------------------------- > 1 file changed, 1 insertion(+), 29 deletions(-) >=20 > diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index > ab6764322523c..3028ac3fd9f6a 100644 > --- a/drivers/dma-buf/udmabuf.c > +++ b/drivers/dma-buf/udmabuf.c > @@ -392,34 +392,6 @@ static struct miscdevice udmabuf_misc =3D { > .name =3D "udmabuf", > .fops =3D &udmabuf_fops, > }; > - > -static int __init udmabuf_dev_init(void) -{ > - int ret; > - > - ret =3D misc_register(&udmabuf_misc); > - if (ret < 0) { > - pr_err("Could not initialize udmabuf device\n"); > - return ret; > - } > - > - ret =3D dma_coerce_mask_and_coherent(udmabuf_misc.this_device, > - DMA_BIT_MASK(64)); > - if (ret < 0) { > - pr_err("Could not setup DMA mask for udmabuf device\n"); > - misc_deregister(&udmabuf_misc); > - return ret; > - } > - > - return 0; > -} > - > -static void __exit udmabuf_dev_exit(void) -{ > - misc_deregister(&udmabuf_misc); > -} > - > -module_init(udmabuf_dev_init) > -module_exit(udmabuf_dev_exit) > +module_misc_device(udmabuf_misc); >=20 > MODULE_AUTHOR("Gerd Hoffmann "); > -- > 2.39.2