All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
	jejb@linux.ibm.com, mpi3mr-linuxdrv.pdl@broadcom.com,
	kashyap.desai@broadcom.com, sathya.prakash@broadcom.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] mpi3mr: Fix W=1 compilation warnings
Date: Mon, 28 Jun 2021 23:44:52 -0400	[thread overview]
Message-ID: <yq1czs5l4uw.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20210623072153.25758-2-sreekanth.reddy@broadcom.com> (Sreekanth Reddy's message of "Wed, 23 Jun 2021 12:51:53 +0530")


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()?

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2021-06-29  3:45 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 [this message]
2021-06-29 14:08     ` Sreekanth Reddy

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=yq1czs5l4uw.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=jejb@linux.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mpi3mr-linuxdrv.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@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.