From patchwork Thu Jun 13 22:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13697572 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 80EF9137923; Thu, 13 Jun 2024 22:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319453; cv=none; b=URzgGCWYtNM7ISeuFYFNACK5LLq0XaMQrG+PfmujK8ezl0a/mCoajhNVVa9M9x/5Xz3s5dtLayQSTUtrntCXYvaIhfjw61Ph5AJpF0lGwQ5fMoj3T1dCaBHjthu5f8pEe5yC0zBxMi0mRQDhpduuoO1ZZLhqF4wtMKlGSXziXp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718319453; c=relaxed/simple; bh=TAWAlunhRer9pK1oqHFQnam5cbE0MFiar34KznrUQj8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=p0OpAZByCkfclX7mVZ/n8OQn6AXtOvefr4oAUNs/3eUkDr1i6Zkgl5G+O5RHbFupWXaRLc9EiyKpHFCHwYQSeV3yFApO/IitvRA/rEujEdnaVqBtpQL+0JBXgDr9s5q4kVVsNHcyTLQa6kRTl+e5tKP37BT6px2R+oaB3cLywD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=tkCPtIW+; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="tkCPtIW+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1718319447; bh=TAWAlunhRer9pK1oqHFQnam5cbE0MFiar34KznrUQj8=; h=From:Date:Subject:To:Cc:From; b=tkCPtIW+eXi1ELdwlWOXKVbhnigmAl76r12QbK6gdMiEZg61+mbLvk0HQzuRB/6Pm vyFji9suCGoYylSHBIqBpUkWAMrwhb21sQj61ovIDvO+S0FfEvgt5BBqfN/PhZuci5 MxOpDojVU0Z1oJYx8dqY4NNkuVTYyuQ9MetSiAzY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 14 Jun 2024 00:57:22 +0200 Subject: [PATCH] watchdog: Make watchdog_class const Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240614-class-const-wdt-v1-1-f9a4e2b1ba76@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAFF5a2YC/x3MQQqAIBBA0avErBvQlKCuEi1EpxoIDScqkO6et HyL/wsIZSaBsSmQ6WLhFCt024DfXFwJOVRDpzqrem3R704EfYpy4h1ONL0dgnLBW6OhVkemhZ/ /OM3v+wF/Jgj1YQAAAA== To: Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718319446; l=889; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=TAWAlunhRer9pK1oqHFQnam5cbE0MFiar34KznrUQj8=; b=V9+f1ZCVwSkLyW0PeDbUT86IWAb+pZNwY3XkQNYs5IMIS0Pf/i3CdtV3dkzMd6AGbLbhT3RpJ rZx308ywsofD3mrdE18CCQCw+SHGG3hNuEtp1z6MZxr+u/SrSm4a5O8 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Now that the driver core allows for struct class to be in read-only memory, mark watchdog_class as const. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck --- drivers/watchdog/watchdog_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: d20f6b3d747c36889b7ce75ee369182af3decb6b change-id: 20240614-class-const-wdt-3649d0adc431 Best regards, diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index e2bd266b1b5b..4190cb800cc4 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -1004,7 +1004,7 @@ static struct miscdevice watchdog_miscdev = { .fops = &watchdog_fops, }; -static struct class watchdog_class = { +static const struct class watchdog_class = { .name = "watchdog", .dev_groups = wdt_groups, };