Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3236069rdb; Tue, 6 Feb 2024 11:01:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3Mwj9Lbn9KJQ16/10kaH6kzCTIcbHffMp22RTuHfH+1izOsT5beaULYAVNDemLwFqn36g X-Received: by 2002:a05:6300:8082:b0:19c:6b59:b9fc with SMTP id ap2-20020a056300808200b0019c6b59b9fcmr2560646pzc.24.1707246080192; Tue, 06 Feb 2024 11:01:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707246080; cv=pass; d=google.com; s=arc-20160816; b=aVCzGmPxfDukF/PimXzSqBIfUmPNoy686816h7M48qoqcoYP1q+656+iTU07g0Fjej SlMYpNWL3jcOYPmObGB7DNz7NfkG3X2+AKoeI1TDde8wwRbMg/daooH/HTlv/bZprp+Y 5Q/A1yBayn/oJhPRSsUpn6MqGMDtRarsOXvWOgUuje1eLYXU8QW6tceY1PmW44e9AOer uW1AWWsdyOZK+DE9Twqr205Ys/ez5rHX96/cyt3NLefaS81qBYcDgyBvk0pBSkmfwQ7X 1NFKJfDCo3YZ1dMe1KOqPgl45GZaj5v/h40+tJSrCYkuUIcEy1xkC6x3dXGs6193ZTsU vROA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hPfbI3eJHKLr9pASN33buZ19U1GjCuKom4JHQ6XyTYw=; fh=nxuQKFpeyGqCD59zS4Fc/1zXXfEY7Fs3rpDcB4RhpBA=; b=W90tsDjvbWVswNfcs0wmk3b5taB2ma/OGtYWQsq5PE4SzeklJnsNQL108qdW7Qb2UC 39kCjWAhFjAYACkTltrFjW1ofHu5AZH7nmdceMjhRwS5U5XJV2o+mAXF51gbPyAnF2oY BGYw1+MI48GaCp0V78H0mNab+fIcUTJNeIRhxFyvWksmVfg9dZ/r9wZtmPl9iHrxpz8H tEd/L0dyfa+3b92yG7wpAySq34s/J/BR3d82DoPnmuCONBPHLBF28gTBfMf9df3O09Cq gaO53VnV8mKURxdoXLxEUNOxYyXEH1moRx7MH2i89JVv39bbw4IMleiB8+1vwIqaW1gK 3B0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NcXugZUr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXBVVjiMEAEUY70vFgjKWKkSt5OQ8V81zj2VgUph/QmOkZA0piVkg2L0txETTAsnqYwCiD0xOX1eJXMULr6io2G92bE+/EZGAdqPNn5qg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w3-20020a63b743000000b005cee178fe54si2139965pgt.222.2024.02.06.11.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 11:01:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NcXugZUr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 3CB16B23702 for ; Tue, 6 Feb 2024 18:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83B8D14280; Tue, 6 Feb 2024 18:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NcXugZUr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A827E14014; Tue, 6 Feb 2024 18:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245862; cv=none; b=Cu1m6gq1PjTLEBTDNtP9Yf1RQGc8cVx3ADckyCcAiLzsih+4gW1asBegzPyORTs8ApNLzwT7za3p1cBETt97jIirubi9dwyJr7LkZCqm5qVrHR+ih7ei+ztP1Ioqq8wXjZQ5awh5AdoaAxvWxNej32xrUOWILRm1QB8jcQhnbJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707245862; c=relaxed/simple; bh=fYHynLl47B1W2Z5QOqN5UVH9e+0HGupd5yGI+0dilNE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HmaCXT0JPPOqNooHV1kIoUvnNRRLDwDFd7k3JNJMaeXx9653lsqwzrS1lFCK6HiTevWAYHI49XD5OM80Mk57TiW1hSgwpYgG/s0SqeNeDH/cGVir8Uj7CdCc1jpSEm6LWYW6CDxjzGewg19CrBXBIIjt4LX5aAC7EPVdg0llTdo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NcXugZUr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC528C433C7; Tue, 6 Feb 2024 18:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707245862; bh=fYHynLl47B1W2Z5QOqN5UVH9e+0HGupd5yGI+0dilNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NcXugZUrvSzDmMY/QV/VC/4yWoI6rqQgS/zzsgpmEms3cr+r3YXi6i6RP62jJVv/y M6OHEyDMIYoxTfEQavGjx606nfuKzcNzb0cYQTQv/VRsG10SzbfU/GNugjcH1ZYSZn RSXhSwID63aVy37na1B3sBcrCmMLfwsl9H3mhPSd0bSS5KXYfPIPyWe+J8msfNf2cW okWhVFSHzpLClYwgJJGrjEP5c7JmjswTeeYsQCrYP1YqagxlZSduCaMT0OdlVKJkW5 QrU/QQh6mF4DtueUT7RIxdvuPZEWV3OJ5QGqDeozQgV6XKYz5gcDLh2ITWEyo/IV/s DNm/0ZAl6xgfQ== Date: Tue, 6 Feb 2024 11:02:14 -0800 From: Bjorn Andersson To: Andrew Davis Cc: Baolin Wang , linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] hwspinlock: omap: Use devm_hwspin_lock_register() helper Message-ID: References: <20240123160405.360437-1-afd@ti.com> <20240123160405.360437-3-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240123160405.360437-3-afd@ti.com> On Tue, Jan 23, 2024 at 10:04:04AM -0600, Andrew Davis wrote: > This unregister the HW spinlock on module exit, allowing us to > remove the remove callback. Do this here. > I interpret this as stating that the driver currently doesn't unregister the spinlocks, but as far as I can see it does, and that the patch has no functional change. Can you please rewrite this commit message to clearly express which "problem" you're solving, and unless I'm mistaken clarify that there's no functional change. Patch itself looks good. Regards, Bjorn > Signed-off-by: Andrew Davis > --- > drivers/hwspinlock/omap_hwspinlock.c | 17 +---------------- > 1 file changed, 1 insertion(+), 16 deletions(-) > > diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c > index 2f18ea6c05e3f..1b0a1bea2b24a 100644 > --- a/drivers/hwspinlock/omap_hwspinlock.c > +++ b/drivers/hwspinlock/omap_hwspinlock.c > @@ -117,12 +117,10 @@ static int omap_hwspinlock_probe(struct platform_device *pdev) > if (!bank) > return -ENOMEM; > > - platform_set_drvdata(pdev, bank); > - > for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) > hwlock->priv = io_base + LOCK_BASE_OFFSET + sizeof(u32) * i; > > - ret = hwspin_lock_register(bank, &pdev->dev, &omap_hwspinlock_ops, > + ret = devm_hwspin_lock_register(&pdev->dev, bank, &omap_hwspinlock_ops, > base_id, num_locks); > if (ret) > return ret; > @@ -133,18 +131,6 @@ static int omap_hwspinlock_probe(struct platform_device *pdev) > return 0; > } > > -static void omap_hwspinlock_remove(struct platform_device *pdev) > -{ > - struct hwspinlock_device *bank = platform_get_drvdata(pdev); > - int ret; > - > - ret = hwspin_lock_unregister(bank); > - if (ret) { > - dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); > - return; > - } > -} > - > static const struct of_device_id omap_hwspinlock_of_match[] = { > { .compatible = "ti,omap4-hwspinlock", }, > { .compatible = "ti,am64-hwspinlock", }, > @@ -155,7 +141,6 @@ MODULE_DEVICE_TABLE(of, omap_hwspinlock_of_match); > > static struct platform_driver omap_hwspinlock_driver = { > .probe = omap_hwspinlock_probe, > - .remove_new = omap_hwspinlock_remove, > .driver = { > .name = "omap_hwspinlock", > .of_match_table = omap_hwspinlock_of_match, > -- > 2.39.2 >