Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2664195imm; Fri, 20 Jul 2018 02:41:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd/BvO6YLJ4WHqF0iskm72z/1eKg2Xx1RDOVcPgif/3GkIH6ox1DaHfq9nrAwJ+JKQ12E6o X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr1418903pll.165.1532079712904; Fri, 20 Jul 2018 02:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532079712; cv=none; d=google.com; s=arc-20160816; b=v1tLphDgicqL/PJD32JE3/XnsIakcAHZCeblAWfEVh6s2HLQoZiuMEoWfq+a2x9GNQ gzvgoZMk7tsAiCOqyXkbBbvvuUNMLlRYHarrxpbk+rQcrKylPqUb7joQa78kLmNBm7rA pKr3JDWGJw4BOahMbepwnQy0Quc70AH7cYJ9Z/7p286VYieIS+zTW5EoD9uNlZ42XsEC 51hDq02djRZJM+Anlrr2qlvM4WkbVv0BwPQj/ac4IsM5rY5N9+NYNR0z+4wHGCmI8038 oIgGtPzWVW5wp9YA/QaFVloF3x9+6GN2x7+mX7QbYnbMcfWonXJQGxn9FvaNaDY9ckmL J6JA== 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:from:to:subject:references:cc:arc-authentication-results; bh=yKRVaZpfcjDrXNzFLh9JxOFCpeiVJxm488CTtNvB/34=; b=tbMmdVAqsfZlosQgEyfYpR2BuVP7xJrdEJrE5atX09jueKWO5qZ5CkciiUE1feMBoM EjDcm2yMimLqpFD8+//RvagERF4KqGXVBseyB+eOhB4RTXvCTGZUU/MMexUxUv1Qk5kd cdSh+5CElmEe4iSyxKjvbkIk219YbAJ/NUkFPpz7JwY5hXZvYXMvNypWLSFtlVD7g6r8 +LYn88IVPvNb3SaWhq23wrpMx7wdCPSvExEr9TK5MNfWHwhDSbKKwj9LsiTVf6oHJ+ib HUcrrSmnE9sk+pefmTIspZ/rrvCbusVnqiJgkft1F/aQO4+0tepwPjVwuDGMId4iFBKF 3QAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p65-v6si1482664pga.401.2018.07.20.02.41.38; Fri, 20 Jul 2018 02:41:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730050AbeGTK2Y (ORCPT + 99 others); Fri, 20 Jul 2018 06:28:24 -0400 Received: from mout.web.de ([212.227.17.12]:53371 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727681AbeGTK2W (ORCPT ); Fri, 20 Jul 2018 06:28:22 -0400 Received: from [192.168.1.2] ([92.228.185.52]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LcgZv-1gPe1Z1d8Z-00k5b2; Fri, 20 Jul 2018 11:40:46 +0200 Cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Gilles Muller , Julia Lawall , Masahiro Yamada , Michal Marek , Nicolas Palix , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= References: <1532047018-23754-1-git-send-email-asmadeus@codewreck.org> Subject: Re: [v3] Coccinelle: suggest replacing strncpy+truncation by strscpy To: Dominique Martinet , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <6c657df2-a524-df22-eceb-6237cb5a9faa@users.sourceforge.net> Date: Fri, 20 Jul 2018 11:40:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532047018-23754-1-git-send-email-asmadeus@codewreck.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:vMh4g6gj3CzhUB8mOzLG5j9AXJP+DoXHS2O06BxDzJ2NRmHb5CT nzKWgOcnaiRhIj9jTKdgPDvUGuBrdgBJRB90Ehtsa4if+dSSBBE7jKzjkSSrZhkxv613RF+ flhQfMJNRRkOoBY7X4gVRwZs42rP90BhStiCWC05+UKZ38Nf/A1J/iSQQwfHbWge1a2IVbs Fq4VZWrC343uE2OOhM6WQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:C1kpxoVY+VM=:pZne0lGUFXuA5kAiuD8wSH xvRFpSDZtj7Nbn0Dv4SycO13dumd+9om13bu7VtUHcTQ8p/jx150ms1fnrLG5DeLV3PsX2r3G QOoMhKGxO9eoVvAT9TTh27izLsWjYkQxI6afVp3ZesolSbGISUXKMH9munXOmTNN0vNKf1GFY PXQXBfGSkiQNGajufPjb5An2JGBYBAZmzkw3K+FUtz0ZmweSUfwwEJKJ0hrMeME8ZjD3eo3sR FzupWS14Gc3nMujm1Ep/JgW/ndpTPS3bUiSPFLrLCGbFn25tn4pAAW8vbe75b69mpQPm3QUL4 +K3bAZ/EBA6sz7kp4ktQfVIiNSF8jvv5d+02csxYCwdhATNcW30XGQhhwKyTO2VGI3DzK5nM8 2bA094gvpki7QQWzoH1vj3FYfglPpgq7822+UwiTPjeTKl4TBXaWw8AsTXvNpme4NhbXexBSl mFZB/+3G+gqYbRRSDDBqwUw2L4joGrPr+lHA2NPUEaxBiho4R2f5D16h67RZpYdgk5HEwMgbN cVDPT2ZIyCNd2SXs7BbaFN1MHovnR4d+1/TlFkFQ5zPADaI+aQRA8zKUl1YdLE9LEqKPAemNb qTMS+osg2F3QX7l2svJViIi62xfGgPumkwhzljdzUcxORoWcET5xRswEHqfwIra5FioX9CO4d 6g8BObEaWnQ86Fl53johp+FoMqjjnl7AYxl9c/i4leCT3MvR1nSTeFTSkDr0m72eg3KwPq7XW 1sMtW4ormFDU4rJCwzbkz59eodN1f66b/6XV7ZH8kMQLEJIMws4RV4Ro8aIZjacZLd5kleFVR RnpiwuV Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I didn't move all virtuals in a single line because none of the other > kernel patch do it, It can be occasionally useful to preserve another bit of coding tradition. I dared to propose the reconsideration of such an implementation detail. > and still do not see any advantage of moving the string to not use a variable > so kept that as well. I am curious if other software developers (besides me) would like to achieve more source code reduction according to the principle “Don't repeat yourself”. > This should hopefully be the last version :) * Do any related development concerns need further safety checks for this evolving source code transformation pattern? * Julia Lawall has presented additional development ideas today. https://lore.kernel.org/lkml/alpine.DEB.2.20.1807200759230.2349@hadrien/ https://lkml.org/lkml/2018/7/20/71 Regards, Markus