Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp800659imu; Tue, 11 Dec 2018 07:48:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VTP15biHtQA81+zcaRSxG1U4VLnBbdDZ/sw1hY2TIzxdREli71YVT3pZKh9lSo/xWoKFIX X-Received: by 2002:a65:4049:: with SMTP id h9mr14804594pgp.304.1544543284036; Tue, 11 Dec 2018 07:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544543284; cv=none; d=google.com; s=arc-20160816; b=KXo52/VKLtqPUs04xCd5FWbq+Aef++sXaKKUtRvnoVma4Px/0A+v0ugHBlWuRvzOxk 46vZIfiR05YKDqIlPQekBA4EEhsM9KTsL40bDB/Dy1P0h8dU8D0DA91wVa3SGYttireT 3VOPkRr8waR0DgD89/lWnK4VNQcmFyuUlybMV8PFjPEyO0mIFvpzpGNFUa0VME8ibTUB L/CByUVHIe5C7Gk0dzbzMrmvjN34fhThVwvoU+CnLOZhymYDNW2+HFUkBOiSxTNWwDcL ktLqUsNDQwdiC/TTPZjR7wD6NWvf/BOVZ26g1rrfixgIKTtbmz/1aOT8RJXjIQSCc4AL xj9Q== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qYp9+UmFBktA0yEZaubluubfbL0gxJaQw5xFIzWRjn0=; b=rJjPj1srzlvmYhB9Rr7be6Fp+WQYrmmdekUSnEbR6VtXF1XWmRb/XSpg39vPCCJ071 gVsoBpHX2CpuJSlcEWpWTdJ6ZfbAOD0DFPCV44MpUnbIWB+8tiCJkp97l/krO57VgGle 9oXEYkDHi934Svr9BchRZFJH4nnyO5n/JgZtZ8qZ/vH2K6WSpxZzrRjhZd9kvadV+lFK rr707/hyZNowctTkRRxx+E7eKSstFCVv/I62UxXuCdCi/ltXU1i7xvG1uaSzCZaESn/N /XmcQgbvcnGb03vtsUv92+2ciyT0GHndwUp4f+vS1o91YC2LGdw9zruCo/WynLTj1/pq D2mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="zAChU/mp"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28si12281644pgm.317.2018.12.11.07.47.49; Tue, 11 Dec 2018 07:48:04 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b="zAChU/mp"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728296AbeLKPqO (ORCPT + 99 others); Tue, 11 Dec 2018 10:46:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:34588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728278AbeLKPqJ (ORCPT ); Tue, 11 Dec 2018 10:46:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F62A2087F; Tue, 11 Dec 2018 15:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543168; bh=Sb2LZhea8SCJikvrUTUObU7rv/95/9mz2XLpBNxe47U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zAChU/mp2QPhwj0JKpD/Sngl3TSbdiTELR+MYeWgS4hFq98xNZizj6+9m1IAswWd3 sokHeWMZCxp9SRcFboUVd+7THBl5oKFIdYX9EOVtTMRUTMxBOQTXHRHAC4PcfvVNf4 Tpm/uE0X1ptMs/yuVf8CsH1bY/FGs0tELifjtTrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.4 38/91] ALSA: trident: Suppress gcc string warning Date: Tue, 11 Dec 2018 16:40:57 +0100 Message-Id: <20181211151608.968759154@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit d6b340d7cb33c816ef4abe8143764ec5ab14a5cc upstream. The meddlesome gcc warns about the possible shortname string in trident driver code: sound/pci/trident/trident.c: In function ‘snd_trident_probe’: sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict] strcat(card->shortname, card->driver); It happens since gcc calculates the possible string size from card->driver, but this can't be true since we did set the string just before that, and they are much shorter. For shutting it up, use the exactly same string set to card->driver for strcat() to card->shortname, too. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/trident/trident.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c @@ -123,7 +123,7 @@ static int snd_trident_probe(struct pci_ } else { strcpy(card->shortname, "Trident "); } - strcat(card->shortname, card->driver); + strcat(card->shortname, str); sprintf(card->longname, "%s PCI Audio at 0x%lx, irq %d", card->shortname, trident->port, trident->irq);