All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	mpi3mr-drvr-developers <mpi3mr-linuxdrv.pdl@broadcom.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] mpi3mr: Fix W=1 compilation warnings
Date: Tue, 29 Jun 2021 19:38:25 +0530	[thread overview]
Message-ID: <CAK=zhgqJuwk2=pbZQnCPyys8Rh+Bi0NT=W8Fa5+oYgweigJ1VQ@mail.gmail.com> (raw)
In-Reply-To: <yq1czs5l4uw.fsf@ca-mkp.ca.oracle.com>

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On Tue, Jun 29, 2021 at 9:14 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
>
> Sreekanth,
>
> > -     strncpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name));
> > -     drv_info->os_name[sizeof(drv_info->os_name) - 1] = 0;
> > -     strncpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version));
> > -     drv_info->os_version[sizeof(drv_info->os_version) - 1] = 0;
> > +     memcpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name) - 1);
> > +     memcpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version) - 1);
>
> strscpy()?

Agreed. Posted a new patch using strscpy().

Thanks,
Sreekanth
>
> --
> Martin K. Petersen      Oracle Linux Engineering

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

      reply	other threads:[~2021-06-29 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  7:21 [PATCH] MAINTAINERS: Add mpi3mr driver maintainers Sreekanth Reddy
2021-06-23  7:21 ` [PATCH] mpi3mr: Fix W=1 compilation warnings Sreekanth Reddy
2021-06-29  3:44   ` Martin K. Petersen
2021-06-29 14:08     ` Sreekanth Reddy [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='CAK=zhgqJuwk2=pbZQnCPyys8Rh+Bi0NT=W8Fa5+oYgweigJ1VQ@mail.gmail.com' \
    --to=sreekanth.reddy@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=martin.petersen@oracle.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --subject='Re: [PATCH] mpi3mr: Fix W=1 compilation warnings' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.