Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1744855imm; Thu, 12 Jul 2018 07:11:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsOhqTKwQtt2rZVCgP4xm9EiH1XHMmRlSXcoWy/49/5+IjKf1jSW5VeXXQlciuzF2S4Kxy X-Received: by 2002:a62:c505:: with SMTP id j5-v6mr2554338pfg.153.1531404671070; Thu, 12 Jul 2018 07:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531404671; cv=none; d=google.com; s=arc-20160816; b=kIiUWsriPGQcDR08zXavukibHhEZx3FbxFEM6UkLryJ121FzaMB6U/6n0pxvVk2PxV k+z+lP1fdFE2LXciKM3/+Y67h2ape9Jwx7Jhmf7zrxrwlGgRyEAaB/ltX+4pF/iqxUZ/ NtbFN7RDZcweME8RFgzp7mrtib5D3XWYtS2Bum45pZ+SO0iwH/tlizKn6QsEPWI79J4X Xqor3vWL/wEoQ7zDfrPA1rswtfkAO8aEoGjTmGI8lNHl3nMsOTzoR09hChOgh6sl7d4u ZwyJhauEe+IMfbEiPNK59JcKu8XbI50R1+8yJCpamXLYiiN9mB5SXYWL3mnrtGODMZVv e+qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=q+fmHMXO9JmT4m6qdNCT42/Xz3dynin470IMLBdYihM=; b=KHIjeMQuExKNpsy4oj9wKUNWusU0wAZ0gqoWLbmoknxyQYDgVnuY2Zaz1GhntCWKeD SZUaAzy+vls6KH3n0DPNZQrtYa5f4uuysYGeGef2Cv0giGtp5KHtI7ItIzDjnRFZq1yl KWIlldxiyNmxP0xj1B3KHmvczPvZAXhGwHmWOpVepWedRVzpDpm5r6wJx7IZ/92ZZQPs t4zb/77dQ+OSqHQot6cO+RYVm7EidptYuRXXwhqANO/HlmbuKMv+pGXc+C5KkGdTIj68 e4CF4CzlIgCC7copXaXahcJRS9thB8hS1alJ4zbBoZH8CthxPgergw9t+o6reEvKANIG 6gxA== 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si21477154ply.66.2018.07.12.07.10.55; Thu, 12 Jul 2018 07:11:11 -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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727641AbeGLOUD (ORCPT + 99 others); Thu, 12 Jul 2018 10:20:03 -0400 Received: from mga05.intel.com ([192.55.52.43]:15922 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbeGLOUD (ORCPT ); Thu, 12 Jul 2018 10:20:03 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 07:10:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,343,1526367600"; d="scan'208";a="66390145" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 12 Jul 2018 07:10:16 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 12 Jul 2018 17:10:15 +0300 Date: Thu, 12 Jul 2018 17:10:15 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Dominique Martinet Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] i915/intel_tv_get_modes: fix strncpy truncation warning Message-ID: <20180712141015.GD5565@intel.com> References: <1531295175-24052-1-git-send-email-asmadeus@codewreck.org> <20180712124401.GZ5565@intel.com> <20180712135526.GA5463@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180712135526.GA5463@nautica> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 03:55:26PM +0200, Dominique Martinet wrote: > Ville Syrjälä wrote on Thu, Jul 12, 2018: > > On Wed, Jul 11, 2018 at 09:46:15AM +0200, Dominique Martinet wrote: > > > This is effectively no-op as the next line writes a nul at the final > > > > What is "This". Please write self contained commit messages. > > This could either be 'this commit' as a whole or if you look only at the > commit message 'this strncpy fix' from the title (which is arguably the > same), and both interpretations sound fairly understandable in the > context of the title line without seeing the patch to me... Although > I'll admit this is difficult to judge of that as the author. The patch subject is not part of the commit message body though. This is made all the more clear when I'm editing the response in vim that doesn't even show the mail subject to me. Hence I'm always left in the dark by commit messages that aren't fully self contained. > > Thanksfully, the v2 of the patch didn't use this wording but while I > agree the message could be better I do not think it was horrible. > > > > > drivers/gpu/drm/i915/intel_tv.c: In function ‘intel_tv_get_modes’: > > > drivers/gpu/drm/i915/intel_tv.c:1358:3: error: ‘strncpy’ specified bound 32 equals destination size [-Werror=stringop-truncation] > > > strncpy(mode_ptr->name, input->name, DRM_DISPLAY_MODE_LEN); > > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > cc1: all warnings being treated as errors > > > > That warning should be in the actual commit message. > > Yes and no, I gave it for referrence but when you update to gcc 8 you > will literally see it all over the place. > The words "strncpy truncation warning" is really precise once you've > seen them a few times and there are litteraly hundred of these warnings > in the kernel, some have already been fixed taking a glance at the git > log, some with and without the warning message. > I don't think it's worth polluting the git log with this many > warnings... Which leads to... I disagree. Without knowing what exactly is fixed how can you judge whether the patch even makes sense? And later you may get another report of the same warning and then you would want to look through the git log to see if there's a patch that already fixed it. Quite hard to do without the exact warning in the log. -- Ville Syrjälä Intel