diff mbox series

[01/13] seq_file: mark seq_get_buf as deprecated

Message ID 20210913054121.616001-2-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/13] seq_file: mark seq_get_buf as deprecated | expand

Commit Message

Christoph Hellwig Sept. 13, 2021, 5:41 a.m. UTC
This function pokes a big hole into the seq_file abstraction.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/seq_file.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Christian Brauner Sept. 13, 2021, 1:19 p.m. UTC | #1
On Mon, Sep 13, 2021 at 07:41:09AM +0200, Christoph Hellwig wrote:
> This function pokes a big hole into the seq_file abstraction.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Good idea.
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Daniel Wagner Sept. 13, 2021, 4:22 p.m. UTC | #2
> + *
> + * DOT NOT USE IN NEW CODE! This function pokes a hole into the whole seq_file
> + * abstraction.  The only remaining user outside of seq_file.c is sysfs, which
> + * is gradually moving away from using seq_get_buf directly.
>   */

Maybe adding a check to checkpatch could also help?
Tejun Heo Sept. 13, 2021, 4:29 p.m. UTC | #3
On Mon, Sep 13, 2021 at 07:41:09AM +0200, Christoph Hellwig wrote:
> This function pokes a big hole into the seq_file abstraction.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  include/linux/seq_file.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
> index dd99569595fd3..db16b11477875 100644
> --- a/include/linux/seq_file.h
> +++ b/include/linux/seq_file.h
> @@ -59,6 +59,10 @@ static inline bool seq_has_overflowed(struct seq_file *m)
>   *
>   * Return the number of bytes available in the buffer, or zero if
>   * there's no space.
> + *
> + * DOT NOT USE IN NEW CODE! This function pokes a hole into the whole seq_file
        ^
       typo

Thanks.
diff mbox series

Patch

diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index dd99569595fd3..db16b11477875 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -59,6 +59,10 @@  static inline bool seq_has_overflowed(struct seq_file *m)
  *
  * Return the number of bytes available in the buffer, or zero if
  * there's no space.
+ *
+ * DOT NOT USE IN NEW CODE! This function pokes a hole into the whole seq_file
+ * abstraction.  The only remaining user outside of seq_file.c is sysfs, which
+ * is gradually moving away from using seq_get_buf directly.
  */
 static inline size_t seq_get_buf(struct seq_file *m, char **bufp)
 {