Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1626718pxb; Sat, 4 Sep 2021 16:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoE+JyenqtS4TMJ49OajVjB0+F6KIAWmr8dVEZDiG3OUzNm7VkVsvZGIflL2D8maa1D2r1 X-Received: by 2002:a05:6402:b47:: with SMTP id bx7mr6377348edb.319.1630797503495; Sat, 04 Sep 2021 16:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630797503; cv=none; d=google.com; s=arc-20160816; b=KC4CsagT0PolhbWDrnj6Do41yOa9zMD7t3kG94xvHBguaPD+b2nmaXjuGRuO9P6aBZ F5CA6/ZeFbyZL5YUV9qrzvEtnD1GUSc39GR3jfIMlWl+Cx8gfyP8vBhTaQSVWzuZljFg VgORZuY7K8d0qU6TzGCJvQ2tdc/T5yB8m1CQpMqhtMD7w4ER0zs1Z1cSCcw1cExu7p+a abc5vI8WrHYHqRnA6fV+/topqNHq3SRzcmNJm38474mx706EpEo2ft2T/VurFhcrfTZv Mf0xijx3k4WL2O7Llpa+IoRK5cCFq3FKYq62SK2MTXmBYGwyU2gTu9AWle1JZlcxZCdM xHMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/d2b2XvRdPISy2stEvhSTES9bNg5OKL/R1eIpuIylJE=; b=nhh3MtYujYOr8tOKhND8giTJd6+JA3eth3i2hF1ZZaVONBRYShT2KpK9kXSbomgEB7 64XReNszr2OBaAExVOG2sTcG79Eq5Gc4jxclBot520hvt2EnDTmlAwerVhaq/D0ufc0y 9uMfn1R9uQwgdhnZ73j+f3jSSN9MQUarCmhCwTTB+8yNYUmRuT2TIS+A0wSlyvscHDnd 1C7eY1SwMF+viwRXv1dlGIERUfbd7E938/pf5O42DmmUvw+Te4LduXDJSQ8hH3pV7IoK hv8H1un1GUL2QTrBRU2iyKfh2yOxogJdizzIQc286I8pvrkPoF6XpwIlmrEyyOUsiish Jm3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VT2IxdjT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si3875904edz.203.2021.09.04.16.18.00; Sat, 04 Sep 2021 16:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VT2IxdjT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235036AbhIDXLc (ORCPT + 99 others); Sat, 4 Sep 2021 19:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231791AbhIDXLb (ORCPT ); Sat, 4 Sep 2021 19:11:31 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A62BAC061575 for ; Sat, 4 Sep 2021 16:10:29 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id mj9-20020a17090b368900b001965618d019so1971393pjb.4 for ; Sat, 04 Sep 2021 16:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/d2b2XvRdPISy2stEvhSTES9bNg5OKL/R1eIpuIylJE=; b=VT2IxdjTrgDAs1fsp3hKmhO4OxIIUC6JtTbWKfYK6o3nmK5KGnXNJ0/w7DlTwqMHl6 CG8uuOq+yFRl1Mhh/ufqxD853Z1yHiJI4G8tsTHQkMF2bIEnR9k21RAkzlbLbXaBMoRe A+wmIKpOEJnVBRYXax4Brums6FKH/BZCkFZ/e2IrptII41tDvCm2TDgQt/8B9V6/9czN TeXRh8LTvXLtMMopuMYpuAMnjUcxYdUQQT4TVLAkya/k6PKcJq7wz93TvvrM94R6dsYe iO7NQPGsX5EKW2PxtkfGhbWTl5G76yLFJm0HTjcUXhAYyauYHvASyvLP7RRQVM0DivDC 3Rng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/d2b2XvRdPISy2stEvhSTES9bNg5OKL/R1eIpuIylJE=; b=o5T9oT5ximi+M21fcpK3bB9YpuRzE1OjUiFTv/bjzb4y8/qMzt1xCmQ5aqk5oKLvqE H4k/Pfj49pA4sAJT2vl5l/kGQcbCxbsNqHgC0cQGceYH9k+GKV37sZfxrPyaqhdlxsLV 9GQJnjKSqeOVpSPRiyIgwaaso3xbnnQuyX8TJqzPvG3JPsmilfK0LBqa31cCsT5olfri r6AJaGjn6hFLhNnmiAwXVhidWq7ZZ2Usn7SAXMDKo8ydJVUUKBAQ0mdYHM4MgGEr4/Gl 2L8DHPJlVZO7TreNr3Tfwf3yC7qMN5FC7eriHAf+SNC9AFtJWlR8R40JsOsJXTMicFdF Avqw== X-Gm-Message-State: AOAM531jSc3555wqtH3ePi+03HR4uvvaeKi1bWaa51dBVA0wkONEvmef LqgohY3n5kFsNms0EHu73zTz+aRvkx3xAg== X-Received: by 2002:a17:902:a503:b029:12b:2429:385e with SMTP id s3-20020a170902a503b029012b2429385emr4797973plq.64.1630797027987; Sat, 04 Sep 2021 16:10:27 -0700 (PDT) Received: from localhost ([202.164.25.5]) by smtp.gmail.com with ESMTPSA id g17sm3198089pfi.168.2021.09.04.16.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Sep 2021 16:10:27 -0700 (PDT) From: Yury Norov To: Petr Mladek , Andrew Morton , Andy Shevchenko , Bartosz Golaszewski , Chris Down , Gilles Muller , Ingo Molnar , Jacob Keller , Joe Perches , Julia Lawall , Michal Marek , Nicolas Palix , Peter Zijlstra , Rasmus Villemoes , Sergey Senozhatsky , Stephen Boyd , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Cc: Yury Norov Subject: [PATCH 0/2] lib: add sputchar() helper Date: Sat, 4 Sep 2021 16:10:18 -0700 Message-Id: <20210904231020.331185-1-yury.norov@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds sputchar() helper and coccinelle script that I used to find candidates for cleanup. Yury Norov (2): lib/vsprintf: add sputchar() coccinelle script include/linux/kernel.h | 8 + lib/string_helpers.c | 56 ++----- lib/vsprintf.c | 222 ++++++++----------------- scripts/coccinelle/misc/sputchar.cocci | 190 +++++++++++++++++++++ 4 files changed, 280 insertions(+), 196 deletions(-) create mode 100644 scripts/coccinelle/misc/sputchar.cocci -- 2.30.2