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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B8E9C25B06 for ; Sun, 14 Aug 2022 04:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbiHNEay (ORCPT ); Sun, 14 Aug 2022 00:30:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiHNEay (ORCPT ); Sun, 14 Aug 2022 00:30:54 -0400 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E134819282; Sat, 13 Aug 2022 21:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=cmuEOBb5dbRHAC7PXZWV6QiRHrjQgW3rz2oIRTfXKEA=; b=JJhUiHHN+18mG4z2c36obGVUdZGZQhT4/obMaoJ68iIM8umq3zv3gCaR c/l2JxwZ/dYgGEIe9pvVe7qHtXza5vJl/x50/oCr03vWKTaWEXvMSrXHB 4E5KxaXW8WpJtC/kyoUJtpg8ixdPW/Lkt3+G0ie7l7G7vTAaEdZTNRTDs U=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.93,236,1654552800"; d="scan'208";a="48737315" Received: from ip-153.net-89-2-7.rev.numericable.fr (HELO hadrien) ([89.2.7.153]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 06:30:49 +0200 Date: Sun, 14 Aug 2022 06:30:48 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Wolfram Sang cc: Linus Torvalds , Julia Lawall , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: Re: [PULL REQUEST] i2c-for-5.20-part2 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Sun, 14 Aug 2022, Wolfram Sang wrote: > On Sun, Aug 14, 2022 at 02:33:40AM +0200, Wolfram Sang wrote: > > > > > (b) auto-convert (with a coccinelle script) all the 'strlcpy()' users > > > that don't care about the return value, and leave a few broken users > > > of strlcpy around > > > > > > I think (b) is the simpler thing, but I have no idea how to write a > > > coccinelle patch that basically does "if return value of strlcpy is > > > not used, convert the strlcpy to a strscpy". > > > > That shouldn't be hard. I'll give it a try tomorrow. > > So, I tried right away and it was really as easy as expected: > > === > @@ > @@ > - strlcpy > + strscpy > (...); > === > > The ';' at the end ensures that spatch only looks for complete > statements not containing anything more than expressed. This is correct. julia > > I pushed out a branch for the testbots now: > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/strlcpy > > Patch granularity might not be perfect currently, but for testing this > should do. > > All the best, > > Wolfram > >