Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Vaibhav Chahar <vaibhav.chahar26@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: Use str_has_prefix instead of strncmp()
Date: Mon, 23 Nov 2026 10:33:45 +0300	[thread overview]
Message-ID: <awPsWXOo2MxJcX-g@stanley.mountain> (raw)
In-Reply-To: <20261121133843.127718-1-vaibhav.chahar26@gmail.com>

On Sat, Nov 21, 2026 at 07:08:43PM +0530, Vaibhav Chahar wrote:
> Using str_has_prefix() is cleaner and more readable than using
> strncmp() with strlen(). Also avoiding the possibility of errors due to
> mismatched string lengths.
> 
> Signed-off-by: Vaibhav Chahar <vaibhav.chahar26@gmail.com>
> ---

Ah.  The str_has_prefix() has been there for 8 years and I'm only
learning about it now.  I like it!  Much more intentional than
strncmp().

Reviewed-by: Dan Carpenter <error27@gmail.com>

regards,
dan carpenter



      reply	other threads:[~2026-11-23  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 13:38 [PATCH] staging: sm750fb: Use str_has_prefix instead of strncmp() Vaibhav Chahar
2026-11-23  7:33 ` Dan Carpenter [this message]

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=awPsWXOo2MxJcX-g@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    --cc=vaibhav.chahar26@gmail.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