Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2542389rdh; Sun, 29 Oct 2023 23:13:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwnefCbr3aICakpvKIXcLL4vpvXwjVFVxGxFZHHlIMdaT+V9SUXWM4Kaganp9otdDq9SsO X-Received: by 2002:a05:6a00:1515:b0:68e:4303:edb8 with SMTP id q21-20020a056a00151500b0068e4303edb8mr12278912pfu.30.1698646415293; Sun, 29 Oct 2023 23:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698646415; cv=none; d=google.com; s=arc-20160816; b=bScBHKKs+UlS1hipaxo64ZobLZksaSXk60rWlL5tPny0pZuyH/F/h3QL5UfmwmGAB5 Q9SwURoL1LK2hXRueXA5r3f52QJVM9nFp04ODuWBlQPp5UbzLOjWFkunbIc3wTjKO7Qy 5nyMr6wI8okzkxHj9OMLQu+Lvja/mXXTgumeYIguHeZZ3JqNLG+Ori7skvtM63zKql5F 4LOS+m1t5b3jbPBdBq2ucePlJpce6cghgAiRexP2MSy2SIjgwZSgbtPLtHqYhGfm2bn7 lsLLH+/oAwdSjZ29i53DIduh/nwFV4kPGRfZlV5VwMnDbF5dL/FPT/qH4Tf6HB3J4+m1 r7PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OBrInguOh70o+aY9HaUuAQ9Z3Jte3FLhkugc/kxvG9w=; fh=gebYC9wRQvfC8D8FGTDjG7Ps86zhoVejf1nPcKPYWuY=; b=ix6s6M+q86rqcDaY2dWrvNDyIX2SjtMIiNM9wSsGI+AAMQ2Td6EA18fu2QMce2wuU5 ud3IyN1S8H+CmIsSvn/1j4Z3DCWaO0g5ETbt6lgKOp22IV+uYW71jtEXrKKRshtoc/gR L31wekkjgfwsyUdbUK9mFZnL84bwmvhWhuLQ8cnnJvtYKvPErcWZWVKwc1Un6tdYL0DV DG6WIFmNYluUPaboAjaD158W57Y4p16Im68+pGDLvfMWtV021wZFl3ja+53AAXT5VFUV lBs3F8WtWI+auVcA/d0sCX5wM4CrJb6/QXiFQgLupfXvYLyaSOQCMqB+DYIGsn7zNXt8 xHkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TQRT3hhW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b18-20020a056a00115200b0068e3f55075esi4508543pfm.134.2023.10.29.23.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 23:13:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TQRT3hhW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7667E806209A; Sun, 29 Oct 2023 23:13:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231339AbjJ3GNZ (ORCPT + 99 others); Mon, 30 Oct 2023 02:13:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231376AbjJ3GNX (ORCPT ); Mon, 30 Oct 2023 02:13:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 060A3C9 for ; Sun, 29 Oct 2023 23:13:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20596C433C8; Mon, 30 Oct 2023 06:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698646400; bh=6qx7gkadhjjPFR2FBT459d6MskGyskl2wBormk0qgU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TQRT3hhWe3ySUJPZU6t5QFh0Ah5G7FADdt82bPl4Ox3CPkwTdLoALxmWMl8u6tXUx R9RuQuWvypFSJhWSrvXo2kWUYFh22EgKSJQO9tmCiF79PpZaQFU3vFEXQOoEEFhSja 05uM4iakw3PJa72dh5R58issdP3bw9z3rEeBftZQ= Date: Mon, 30 Oct 2023 07:13:17 +0100 From: Greg Kroah-Hartman To: Nancy Nyambura Cc: nicydaniels@gmail.com, outreachy@lists.linux.dev, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rts5208: Replace strncpy() with strscpy() for appropriate string copying in rtsx_scsi line 524 warning: found by checkpatch.pl script Message-ID: <2023103052-musky-defacing-ca25@gregkh> References: <20231029191647.44127-1-nicymimz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231029191647.44127-1-nicymimz@gmail.com> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 29 Oct 2023 23:13:32 -0700 (PDT) On Sun, Oct 29, 2023 at 10:16:42PM +0300, Nancy Nyambura wrote: > Signed-off-by: Nancy Nyambura > --- > drivers/staging/rts5208/rtsx_scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rts5208/rtsx_scsi.c b/drivers/staging/rts5208/rtsx_scsi.c > index 08bd768ad34d..52324b8ebbc7 100644 > --- a/drivers/staging/rts5208/rtsx_scsi.c > +++ b/drivers/staging/rts5208/rtsx_scsi.c > @@ -523,7 +523,7 @@ static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip) > > if (sendbytes > 8) { > memcpy(buf, inquiry_buf, 8); > - strncpy(buf + 8, inquiry_string, sendbytes - 8); > + strscpy(buf + 8, inquiry_string, sendbytes - 8); > if (pro_formatter_flag) { > /* Additional Length */ > buf[4] = 0x33; > -- > 2.40.1 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what a proper Subject: line should look like. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot