From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 304B42C326F for ; Tue, 3 Jun 2025 18:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748973644; cv=none; b=pF6WrKFnBhtHybWhGQbxkUcInv7texKGOjGyOHX5AjDvmqYtzLf3+08C1AOJY/DT0S4pUb3HzSMSh6EDaR5lB8gE57L4/FMGApqVSBECq3D3CwpMzSmHZ4QqBPaBx4GcWuCwCdMz5qkmAFYjE1xGRc9gcsjz5m68lzNuvHQ4Bac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748973644; c=relaxed/simple; bh=rD3AJa/sm9PmeCYaTHhDjRKPgFI4ycYyijxoyHiuPMY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ERjKFiEbqfQub3n4xJVZoXIZCXXtANOKvj0+fTJ2JETgQ9NP4xvuNJuFRPERHoicdOeCkd3e/uoUbsltd05BhdndWSzEnHfyy1HoeQnsUmmrD3KaCwQMwjxEke9hBMUaO21kjvXbMeA+oOtWgtY9FQ2R4dkDKzB70IfTofqSbFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=wwm52Edg; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="wwm52Edg" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-747fc7506d4so1087018b3a.0 for ; Tue, 03 Jun 2025 11:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1748973642; x=1749578442; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=G6fuPGgjUjgpvLiVwa9uHLktuxrC3x8lruIV/MEvnmQ=; b=wwm52Edgrgte6rYG/zlE9Ry0gBCdq4uAoXMF1oJtkTJyUjXGWONiMlPLPVZxbjfy0h 8BorKPO+EcPT88gqU2pUvEsrDs4c9ieiauz2QRlYZYRpSP4cu8Z7NagQPijf2jZ5BDdS m5vf17eekLMVOwPYPbVQoU5V25/F9v89n696KmhEe5zIjUQxovqv3sd6xtojK9Rse9/K 4CaNbFY78DrSRedrSIp2sDuo+IOFdWAjIOFhmnaUKEhI+KQJ9ChKsHwn7LQbSOKVHoo+ 0QriEywe/rxDSOuK0mpGV+ESWNf8Ud4J2vohRTymdhdqThiWvfv6Pl0vSFsYDAglJ5hp uPDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748973642; x=1749578442; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=G6fuPGgjUjgpvLiVwa9uHLktuxrC3x8lruIV/MEvnmQ=; b=t3acEDxzWGaQ35kxt4pbBUeneaI5owRVCRX79ms2PKhgTS82wXRQNBvzHr4h6U/+1u KBXXpyXZ9YZMdOm5YH30WXnUkFJsJzlC/Cj/cpdzOLcRjOZFDRSG8IPw94gPsa/Xcza5 O1/QTT0i7KhAIa35YcrzETODwPJaTK6t1RrNNPTpZR3m2D+rU0/SZOIRwg0+lA7NoiKS eQ2gWnNnc3uqIj7wMxn2AmJw7lMU/FVxhtC5UXI7227KiqKxVPpgQGy/B6vKAgrTWLqm z01rTsr3k6Egf6Po4GpqbdmGTs4H4+Ec65+YQOEKC0B9aRbgDgb7LBosEPDLD99AFfKI sEhg== X-Forwarded-Encrypted: i=1; AJvYcCW19/Ibtuqo66p6ZGWWqD+PIPw7IuYWkq1lPQsln66sYb2H69ufmHb7E4MnxI2+Gi+1IH+wL1ZTvO7qHA==@lists.linux.dev X-Gm-Message-State: AOJu0YzfGsdoTZh3Md9NJNE7n2tY7aX3ESDd7lPGYURDMcEhv2GA9fNu gNrKgJk72mpw8cTChp+IgtVuNZVvCWK7O8mqHv1iMos73MazO33YIrEJ/hTbFHhhQQ== X-Gm-Gg: ASbGncuNvqIa4vF9LxQv9kRh217415bNiFDOOseyJJAFqzcrxEJqNC0e34ZUGsHF4k2 DMYdgzCeiPZWgTgWZ0A3zG5nAk+XPzGXnDfb32wV/QGWa65LwVs/nJa92X1dxTM2j/G6GSemzZ9 htNbb6nOCWSqAtzNqdzHNgvbgoXMiHU8Yb9igEphsyMLqWgnPvGQWQDqjieMuGMqncQ3SrZXAoo 24e4+NL7WPbYQqHYNYJElz4MtJjfzmb5YQdSue3CWKlh5V5v+WA1SraOCMuuyV1msO7+O8HVKmj WCXbbfO7m5uy3BU7ZKz8vFRQzub/lR1chtSXIoNeqEcV3Gjf66W1LV09flsd8n9vkApv+ibV36l FuskrHfd5tvCgaURqmTfekh0vfII= X-Google-Smtp-Source: AGHT+IEodTIVtAPtf3Z5cQ4Uq1uQBXjGOn+G7Y9GhI4s+r7QBMKm7jSlhasASzLhvPxxrzys9RVm6Q== X-Received: by 2002:a05:6a00:1a8d:b0:742:a77b:8c4 with SMTP id d2e1a72fcca58-7480b1f6371mr74882b3a.3.1748973641368; Tue, 03 Jun 2025 11:00:41 -0700 (PDT) Received: from google.com (128.65.83.34.bc.googleusercontent.com. [34.83.65.128]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2ecebb4834sm6427681a12.74.2025.06.03.11.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jun 2025 11:00:40 -0700 (PDT) Date: Tue, 3 Jun 2025 11:00:37 -0700 From: William McVicker To: Daniel Lezcano Cc: tglx@linutronix.de, Jim Cromie , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , "Peter Zijlstra (Intel)" , Marco Elver , Nam Cao , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, John Stulz , Peter Griffin , Saravan Kanna Subject: Re: [PATCH v1 6/7] clocksource/drivers/cs5535: Add module owner Message-ID: References: <20250602151853.1942521-1-daniel.lezcano@linaro.org> <20250602151853.1942521-7-daniel.lezcano@linaro.org> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250602151853.1942521-7-daniel.lezcano@linaro.org> On 06/02/2025, Daniel Lezcano wrote: > The conversion to modules requires a correct handling of the module > refcount in order to prevent to unload it if it is in use. That is > especially true with the clockevents where there is no function to > unregister them. > > The core time framework correctly handles the module refcount with the > different clocksource and clockevents if the module owner is set. > > Add the module owner to make sure the core framework will prevent > stupid things happening when the driver will be converted into a > module. > > Signed-off-by: Daniel Lezcano Reviewed-by: Will McVicker Thanks, Will > --- > drivers/clocksource/timer-cs5535.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/clocksource/timer-cs5535.c b/drivers/clocksource/timer-cs5535.c > index d47acfe848ae..8af666c39890 100644 > --- a/drivers/clocksource/timer-cs5535.c > +++ b/drivers/clocksource/timer-cs5535.c > @@ -101,6 +101,7 @@ static struct clock_event_device cs5535_clockevent = { > .tick_resume = mfgpt_shutdown, > .set_next_event = mfgpt_next_event, > .rating = 250, > + .owner = THIS_MODULE, > }; > > static irqreturn_t mfgpt_tick(int irq, void *dev_id) > -- > 2.43.0 >