Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1531pxk; Sat, 29 Aug 2020 13:24:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7dic3KW+suxioYWX6xFU47NtIhNLOh5qz8cxYXPnhFmQzZj1qruYTOQRrmq+zPGLU1KEk X-Received: by 2002:a05:6402:1696:: with SMTP id a22mr4884898edv.126.1598732682996; Sat, 29 Aug 2020 13:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598732682; cv=none; d=google.com; s=arc-20160816; b=j8A7tvyIJkLwZu7KL0rxpWLuG0fPLwHJkiur+ydXBD54Skpb+Xc1n+us/MhntKxEkb +ietyzKXvRN0+OzHqz5HbzmF0J+PtBaUBlvpApIhagcxGkCtgFkfYIhuemkVc/MVgznd SoXkwp1+5mM3M0vKHzU8oY5Cr6CoAuG//+5jAMwm9CCuwYSPcWkCOogSkG2WB/AXIF1p TNE6xf8t0QYycglO9Pl19tO/24TVuFgvP+RLiBwbEFNR2/lIOiT+Jj+7SuKJjVzqwjWZ b77Y7JiHjhlATneaLIIs/1f7X0UdThlJpZvFoqm+LBUSxObHSJS4eGqOEsos0MKvKwmq kavA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:from:references:cc:to; bh=0psqWY1UibiP9385DJlhe9bRQhCV2K+TluDGRru+tME=; b=AAMXGerPc4d0gZmZVcm4N9w6Rot7lglswaIDz9wUEnvcpDjzhm+uyC4foJEGoh30en ReA5tTkG0D8LHSiEZz7eQE9rDa6JRSjb7X2lp1b+f6VichYeGvhUtIM91O/m634uCe2t P5oU1F6Cpba5imAdfznfD+RuVXQiw3QbVT5gPcxaNZm4YkT49BSK1vY0da0JUNKngmGE jUUtcasNejNWrvcjrvZY6hnnNcPendFbfaHaol90TXCjs8gAv/6uF6UbK/uHSUkec1UA m6OXlz24vcX4CKZHoIZPgGdBfNMcpOtDYeAl1OjHj0C+GCTc6jBL3YfB26FLPW1EEQDO tskw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si2184774eds.317.2020.08.29.13.24.03; Sat, 29 Aug 2020 13:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728491AbgH2UX4 (ORCPT + 99 others); Sat, 29 Aug 2020 16:23:56 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42101 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbgH2UXy (ORCPT ); Sat, 29 Aug 2020 16:23:54 -0400 Received: by mail-lf1-f66.google.com with SMTP id c8so1454061lfh.9; Sat, 29 Aug 2020 13:23:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=0psqWY1UibiP9385DJlhe9bRQhCV2K+TluDGRru+tME=; b=e7kP5L/d5joi6JjUSWnOIf6tBomo5zwQ61x3+zlg1hWlEkq2TcF8AJvTxUCjw64VFf ptgAmtiu+IIIL4muKrKc1Ak0t9oOEcs/4dKdofkcKK98RG7OdWiCRLJTPVYXsUQrJADb o0YL4YyfHYcsTWpnYOmeWhdRdH84zqI8dg/Mods5x338faXX4oEH0TorJCCi/ievBf19 Ss+vNJwBGDf7kFxqbJORTPdCg/m8FSyll2APiSPVSRqHR5Vhajm4tfooxYrnJJ39AAKD m+TplEsDffq6PcumUbSWqqgcjSWi8JFHlHAqnTpZAkYKgWzGUE+FEb4dbM1RBBv1T0ld Komg== X-Gm-Message-State: AOAM532BaqRzFyLZ6Y+uP4qhDT0/rFQzlkvTpVtG8WeR+0v30yM1geQ3 XNE5DSrCcjHWOtVMJ3Xp+JHHbYRjq0XAaA== X-Received: by 2002:ac2:559a:: with SMTP id v26mr2171329lfg.174.1598732629569; Sat, 29 Aug 2020 13:23:49 -0700 (PDT) Received: from [192.168.1.8] ([213.87.147.111]) by smtp.gmail.com with ESMTPSA id n26sm659380ljg.15.2020.08.29.13.23.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Aug 2020 13:23:48 -0700 (PDT) To: Joe Perches , LKML , Greg Kroah-Hartman , "Rafael J. Wysocki" , Kees Cook , "Gustavo A . R . Silva" , Julia Lawall , Alex Dewar Cc: York Sun , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Michal Simek , Boris Brezillon , Maxim Levitsky , Alex Dubov , Ulf Hansson , Tomas Winkler , Arnd Bergmann , Madalin Bucur , "David S. Miller" , Jakub Kicinski , Douglas Miller , Stanislav Yakovlev , Kalle Valo , Darren Hart , Andy Shevchenko , =?UTF-8?Q?Kai_M=c3=a4kisara?= , "James E.J. Bottomley" , "Martin K. Petersen" , Mark Brown , Oliver Neukum , Pete Zaitcev , linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i3c@lists.infradead.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-scsi@vger.kernel.org, linux-spi@vger.kernel.org, linux-usb@vger.kernel.org References: <0f837bfb394ac632241eaac3e349b2ba806bce09.camel@perches.com> From: Denis Efremov Autocr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7HGetSH8gcgpc7q3kCObmDSa3aTGTkawNHzbceEJrL6 mRD6GbjU4GPD06/dTRIhQatKgE4ekv5wnxBK6v9CVKViqpn7vIxiTI9/VtTKndzdnKE6C72+ jTwSYVa1vMxJABtOSg8AEQEAAYkCPAQYAQgAJgIbDBYhBHZUAzYClA3xkg/kA7UilbAzUDAf BQJexC4MBQkHfUOQAAoJELUilbAzUDAfPYoQAJdBGd9WZIid10FCoI30QXA82SHmxWe0Xy7h r4bbZobDPc7GbTHeDIYmUF24jI15NZ/Xy9ADAL0TpEg3fNVad2eslhCwiQViWfKOGOLLMe7v zod9dwxYdGXnNRlW+YOCdFNVPMvPDr08zgzXaZ2+QJjp44HSyzxgONmHAroFcqCFUlfAqUDO T30gV5bQ8BHqvfWyEhJT+CS3JJyP8BmmSgPa0Adlp6Do+pRsOO1YNNO78SYABhMi3fEa7X37 WxL31TrNCPnIauTgZtf/KCFQJpKaakC3ffEkPhyTjEl7oOE9xccNjccZraadi+2uHV0ULA1m ycHhb817A03n1I00QwLf2wOkckdqTqRbFFI/ik69hF9hemK/BmAHpShI+z1JsYT9cSs8D7wb aF/jQVy4URensgAPkgXsRiboqOj/rTz9F5mpd/gPU/IOUPFEMoo4TInt/+dEVECHioU3RRrW EahrGMfRngbdp/mKs9aBR56ECMfFFUPyI3VJsNbgpcIJjV/0N+JdJKQpJ/4uQ2zNm0wH/RU8 CRJvEwtKemX6fp/zLI36Gvz8zJIjSBIEqCb7vdgvWarksrhmi6/Jay5zRZ03+k6YwiqgX8t7 ANwvYa1h1dQ36OiTqm1cIxRCGl4wrypOVGx3OjCar7sBLD+NkwO4RaqFvdv0xuuy4x01VnOF Subject: Re: sysfs output without newlines Message-ID: <4cd6275c-6e95-3aeb-9924-141f62e00449@linux.com> Date: Sat, 29 Aug 2020 23:23:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <0f837bfb394ac632241eaac3e349b2ba806bce09.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, On 8/29/20 9:23 PM, Joe Perches wrote: > While doing an investigation for a possible treewide conversion of > sysfs output using sprintf/snprintf/scnprintf, I discovered > several instances of sysfs output without terminating newlines. > > It seems likely all of these should have newline terminations > or have the \n\r termination changed to a single newline. I think that it could break badly written scripts in rare cases. > > Anyone have any objection to patches adding newlines to these > in their original forms using sprintf/snprintf/scnprintf? I'm not sure about existing cases, but I think it's a good checkpatch.pl warning for new patches. It should be possible to check sysfs_emit() calls. Thanks, Denis