From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D275C433DB for ; Thu, 7 Jan 2021 18:06:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D160323370 for ; Thu, 7 Jan 2021 18:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729169AbhAGSGg (ORCPT ); Thu, 7 Jan 2021 13:06:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:49098 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728571AbhAGSGf (ORCPT ); Thu, 7 Jan 2021 13:06:35 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2C5BDAAF1; Thu, 7 Jan 2021 18:05:54 +0000 (UTC) Date: Thu, 07 Jan 2021 19:05:53 +0100 Message-ID: From: Takashi Iwai To: Joe Perches Cc: Jaroslav Kysela , Takashi Iwai , LKML , kernel-janitors , Julia Lawall , alsa-devel Subject: Re: [PATCH resend] sound: Convert strlcpy to strscpy when return value is unused In-Reply-To: <22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com> References: <22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Jan 2021 18:17:34 +0100, Joe Perches wrote: > > strlcpy is deprecated. see: Documentation/process/deprecated.rst > > Change the calls that do not use the strlcpy return value to the > preferred strscpy. > > Done with cocci script: > > @@ > expression e1, e2, e3; > @@ > > - strlcpy( > + strscpy( > e1, e2, e3); > > This cocci script leaves the instances where the return value is > used unchanged. > > After this patch, sound/ has 3 uses of strlcpy() that need to be > manually inspected for conversion and changed one day. > > $ git grep -w strlcpy sound/ > sound/usb/card.c: len = strlcpy(card->longname, s, sizeof(card->longname)); > sound/usb/mixer.c: return strlcpy(buf, p->name, buflen); > sound/usb/mixer.c: return strlcpy(buf, p->names[index], buflen); > > Miscellenea: > > o Remove trailing whitespace in conversion of sound/core/hwdep.c > > Link: https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ > > Signed-off-by: Joe Perches Applied now. Thanks. Takashi