public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Nam Cao <namcao@linutronix.de>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andreas Hindborg <a.hindborg@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Miguel Ojeda <ojeda@kernel.org>, Kees Cook <kees@kernel.org>,
	linux-kernel@vger.kernel.org
Cc: "Nam Cao" <namcao@linutronix.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Will Deacon" <will@kernel.org>, "Jon Mason" <jdmason@kudzu.us>,
	"Jaehoon Chung" <jh80.chung@samsung.com>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	"Jassi Brar" <jassisinghbrar@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Andi Shyti" <andi.shyti@kernel.org>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Rob Clark" <robdclark@gmail.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Zack Rusin" <zack.rusin@broadcom.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Takashi Iwai" <tiwai@suse.com>,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH 00/44] hrtimers: Switch to new hrtimer interface functions (4/5)
Date: Mon, 28 Oct 2024 10:58:34 +0200	[thread overview]
Message-ID: <87y128txhh.fsf@ubik.fi.intel.com> (raw)
In-Reply-To: <cover.1729865485.git.namcao@linutronix.de>

Nam Cao <namcao@linutronix.de> writes:

> This is the forth part of a 5-part series (split for convenience). All 5
> parts are:
>
> Part 1: https://lore.kernel.org/lkml/cover.1729864615.git.namcao@linutronix.de
> Part 2: https://lore.kernel.org/lkml/cover.1729864823.git.namcao@linutronix.de
> Part 3: https://lore.kernel.org/lkml/cover.1729865232.git.namcao@linutronix.de
> Part 4: https://lore.kernel.org/lkml/cover.1729865485.git.namcao@linutronix.de
> Part 5: https://lore.kernel.org/lkml/cover.1729865740.git.namcao@linutronix.de

Which one do I need to click on to see the actual hrtimer_setup*()
implementations? Why is it even a separate series? Please, don't make
people click on things.

> To use hrtimer, hrtimer_init() (or one of its variant) must be called, and
> also the timer's callfack function must be setup separately.

"callback", right?

> That can cause misuse of hrtimer. For example, because:
>   - The callback function is not setup
>   - The callback function is setup while it is not safe to do so

These are not examples, these are hypotheticals. Do either of these
things actually happen in the codebase?

> To prevent misuse of hrtimer, this series:
>   - Introduce new functions hrtimer_setup*(). These new functions are
>     similar to hrtimer_init*(), except that they also sanity-check and
>     initialize the callback function.

No, it doesn't. This series only converts some drivers. I'd like to see
the sanity-checking in question, since it's the big selling point.
But IMO, "switching to a cleaner hrtimer API" or some words to that
effect is a better justification than sanity checking.

I'm not objecting to the idea, it's just carried out weirdly.

>   - Introduce hrtimer_update_function() which checks that it is safe to
>     change the callback function. The 'function' field of hrtimer is then
>     made private.

Also not in this series.

>   - Convert all users to use the new functions.
>   - Some minor cleanups on the way.

Thanks,
--
Alex

  parent reply	other threads:[~2024-10-28  8:58 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28  7:34 [PATCH 00/44] hrtimers: Switch to new hrtimer interface functions (4/5) Nam Cao
2024-10-28  7:34 ` [PATCH 01/44] USB: chipidea: Switch to use hrtimer_setup() Nam Cao
2024-10-28  7:34 ` [PATCH 02/44] usb: dwc2: " Nam Cao
2024-10-28  7:34 ` [PATCH 03/44] usb: fotg210-hcd: " Nam Cao
2024-10-28  7:34 ` [PATCH 04/44] usb: gadget: " Nam Cao
2024-10-28  7:34 ` [PATCH 05/44] usb: ehci: " Nam Cao
2024-10-28  7:34 ` [PATCH 06/44] usb: musb: cppi41: " Nam Cao
2024-10-28  7:34 ` [PATCH 07/44] usb: typec: tcpm: " Nam Cao
2024-10-28  7:34 ` [PATCH 08/44] serial: 8250: " Nam Cao
2024-10-28  7:34 ` [PATCH 09/44] serial: imx: " Nam Cao
2024-10-28  7:34 ` [PATCH 10/44] serial: sh-sci: " Nam Cao
2024-10-28  7:34 ` [PATCH 11/44] serial: xilinx_uartps: " Nam Cao
2024-10-28  7:34 ` [PATCH 12/44] scsi: " Nam Cao
2024-10-28  7:34 ` [PATCH 13/44] rtc: class: " Nam Cao
2024-10-28  7:34 ` [PATCH 14/44] pps: generators: pps_gen_parport: " Nam Cao
2024-10-28  7:34 ` [PATCH 15/44] powercap: " Nam Cao
2024-10-28 11:44   ` Rafael J. Wysocki
2024-10-28  7:34 ` [PATCH 16/44] power: supply: ab8500_chargalg: " Nam Cao
2024-10-28 12:48   ` Linus Walleij
2024-10-28  7:34 ` [PATCH 17/44] power: reset: ltc2952-poweroff: " Nam Cao
2024-10-28  7:34 ` [PATCH 18/44] drivers: perf: " Nam Cao
2024-10-28  7:34 ` [PATCH 19/44] ntb: ntb_pingpong: " Nam Cao
2024-10-28  7:34 ` [PATCH 20/44] mmc: dw_mmc: " Nam Cao
2024-10-28  7:34 ` [PATCH 21/44] misc: vcpu_stall_detector: " Nam Cao
2024-10-28  7:34 ` [PATCH 22/44] media: " Nam Cao
2024-10-28  8:00   ` Hans Verkuil
2024-10-28  7:34 ` [PATCH 23/44] mailbox: " Nam Cao
2024-10-28  7:35 ` [PATCH 24/44] leds: trigger: pattern: " Nam Cao
2024-10-28  7:35 ` [PATCH 25/44] Input: " Nam Cao
2024-10-28  7:35 ` [PATCH 26/44] iio: " Nam Cao
2024-11-02 16:00   ` Jonathan Cameron
2024-10-28  7:35 ` [PATCH 27/44] i2c: " Nam Cao
2024-10-28  7:35 ` [PATCH 28/44] stm class: heartbeat: " Nam Cao
2024-10-28  7:35 ` [PATCH 29/44] drm/amdgpu: " Nam Cao
2024-10-28  7:35 ` [PATCH 30/44] drm/i915/huc: " Nam Cao
2024-10-28  7:35 ` [PATCH 31/44] drm/i915/gvt: " Nam Cao
2024-10-28  7:35 ` [PATCH 32/44] drm/i915/perf: " Nam Cao
2024-10-28  7:35 ` [PATCH 33/44] drm/i915/pmu: " Nam Cao
2024-10-28  7:35 ` [PATCH 34/44] drm/i915/uncore: " Nam Cao
2024-10-28  7:35 ` [PATCH 35/44] drm/i915/request: " Nam Cao
2024-10-28  7:35 ` [PATCH 36/44] drm/msm: " Nam Cao
2024-10-28  7:35 ` [PATCH 37/44] drm/vkms: " Nam Cao
2024-10-28  7:35 ` [PATCH 38/44] drm/xe/oa: " Nam Cao
2024-10-31 13:12   ` Lucas De Marchi
2024-10-28  7:35 ` [PATCH 39/44] drm/vmwgfx: " Nam Cao
2024-10-28  7:35 ` [PATCH 40/44] virtio: mem: " Nam Cao
2024-10-28  7:35 ` [PATCH 41/44] RDMA: " Nam Cao
2024-10-28  7:35 ` [PATCH 42/44] pwm: gpio: " Nam Cao
2024-10-28  7:35 ` [PATCH 43/44] ASoC: fsl: imx-pcm-fiq: " Nam Cao
2024-10-28  7:35 ` [PATCH 44/44] ALSA: " Nam Cao
2024-10-28  8:58 ` Alexander Shishkin [this message]
2024-10-28 11:06   ` [PATCH 00/44] hrtimers: Switch to new hrtimer interface functions (4/5) Thomas Gleixner
2024-10-31 12:21 ` Jani Nikula
2024-10-31 15:59 ` Zack Rusin
2024-10-31 21:42 ` Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y128txhh.fsf@ubik.fi.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=a.hindborg@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aliceryhl@google.com \
    --cc=andi.shyti@kernel.org \
    --cc=anna-maria@linutronix.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=frederic@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jani.nikula@linux.intel.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jdmason@kudzu.us \
    --cc=jgg@ziepe.ca \
    --cc=jh80.chung@samsung.com \
    --cc=jic23@kernel.org \
    --cc=kees@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=martin.petersen@oracle.com \
    --cc=mst@redhat.com \
    --cc=namcao@linutronix.de \
    --cc=ojeda@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sre@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=ukleinek@kernel.org \
    --cc=will@kernel.org \
    --cc=zack.rusin@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox