Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1244388rwb; Sat, 13 Aug 2022 22:05:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7voeZ2HrP34cZOvUmVaEM02+si4La5VcCsTl7QoHDGnx+Gf/Qv+bTYDkOx6uTxr33M/WUz X-Received: by 2002:a63:4d4a:0:b0:423:1b0:e5c1 with SMTP id n10-20020a634d4a000000b0042301b0e5c1mr5836733pgl.585.1660453519928; Sat, 13 Aug 2022 22:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660453519; cv=none; d=google.com; s=arc-20160816; b=jtyPu9X39IZGTq1+sXC1jArKNBJFK5V90glarTrJ8Yp7PNR09oOW5sui09uvuDlLrE CoEM17urylgfuiG428nO6NmJDCxH/TddhqB4CHy42xC6srvR7vwqRvLY/JpXCXncUGpi fnQVRKZU5/PpvsGHgwSAAfTj5Kscno2BmTtxHugAU+/R3jktdEDfnqaT67KmNdRMPXOg 3Z4GTOcGCyqrHX8p1KUhqHqTou755/h8vXlvWv748wp6bqcMz/Ogbkd0abPouaTj24Yh kNIbAd9cPLDqJlkWu+KIplK7JuxQCkMLI66HnnCHIkhzZnxu5JFSNzRm3sF7A/IxnzeI acsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=cmuEOBb5dbRHAC7PXZWV6QiRHrjQgW3rz2oIRTfXKEA=; b=I8drwdkCrbCChLBEWdWowlpqrwRsn8ZKZA/1iYvs322EdbxrFiorvOgpofbs0qeF3s hBL+s9Iy79aAaKQ77Iy25EpV2Y0quWCt8hPrepLa7nrfj4JdUx6C8fUX5rFKUI3CMSBD 5wNpASCEnBQQOYDwIsb1RAr5NWL3wiCsFLdfGup5k6mRXP2LEi+xHsxWBysq1VIoy5n4 u2Gi9kafoXJW23wxi23hEupJtSpVyyhQzNcLvGBZFMQC8XFgHVp3UpDYzpJJ2d7q/F+a bWHSp5NgjyDO4big3gfAfgyHoX1t1vMtNpR84qp0WpQIU0h2lHFXmwv/0ecHEBHoLy/g kENQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=JJhUiHHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a630003000000b004119e27a4d2si6664371pga.507.2022.08.13.22.05.08; Sat, 13 Aug 2022 22:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=JJhUiHHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbiHNEaz (ORCPT + 99 others); Sun, 14 Aug 2022 00:30:55 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 > >