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,URIBL_BLOCKED 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 CE113C433E6 for ; Mon, 4 Jan 2021 17:00:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EC8A22509 for ; Mon, 4 Jan 2021 17:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728017AbhADRAg (ORCPT ); Mon, 4 Jan 2021 12:00:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:44046 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbhADRAf (ORCPT ); Mon, 4 Jan 2021 12:00: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 62BAEAA35; Mon, 4 Jan 2021 16:59:53 +0000 (UTC) Date: Mon, 04 Jan 2021 17:59:53 +0100 Message-ID: From: Takashi Iwai To: Joe Perches Cc: Jaroslav Kysela , Takashi Iwai , LKML , kernel-janitors , Julia Lawall Subject: Re: [PATCH] sound: Convert strlcpy to strscpy when return value is unused In-Reply-To: <58a84d03b714f71d231f9cac04af09a6b97c6f04.camel@perches.com> References: <58a84d03b714f71d231f9cac04af09a6b97c6f04.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 Thu, 31 Dec 2020 20:04:50 +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 Could you resubmit to alsa-devel ML? thanks, Takashi