Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp575073img; Fri, 22 Mar 2019 04:21:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpDrgWKfQQlWnEVDnvhvyWMOsgTRW5ATvmlsQts8SKRVfeOSmNkk6DfT+GUoM5/Tox9i8v X-Received: by 2002:a63:ff5a:: with SMTP id s26mr7842790pgk.96.1553253673672; Fri, 22 Mar 2019 04:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253673; cv=none; d=google.com; s=arc-20160816; b=upT7brj9JZkFlTKYs3WsWr2LlXlbNgw4iyzXO7bMPXr8JP2OrCAVP6sTvisuXDS7n4 T1uatea6f4FxAc3xdodt4Wn3vsxPM1XEDCLn6hTFU7TzbT3G8GMl17QBCier7jCsDfiE fFtYvjWR6b03tExer0k8k41I043j2U3CoKUGote+3IFTZaoT6ckN1nJihsEds69rCspH CdXjQOYaWRYmD7I1Ge/9JpzUeyGhus2Pd6rptBmztv1Eu/aK2rYv92QV0nloq3V83ow5 zA/1YUAWjOO9laIojrzijpFXisAAggTW3LgzyBo/7L/jwuyZsLEZyVWNnkIR4A4WCoio tXBw== 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=U4xQNTzisF5v64u2idRiSNOS5sDlQ19GG6OWWVOzQdI=; b=aErwh6p/ROjEvggfIzcdEGs9OmqhsYlDRt//R5tSSLFhAEwRiofoEEIF8tVF9eRWoo UFCTPlxHlBcZuZLDKvAR5xoFrMTx3wkxkCpaV+Fmg8oNx9A6ihv9H7+7YSrpONWQ3d/j jvMqswlsV6Onvj9TvcZfocEZbHJjV7wQmcu+bFpQkFnhRhGUbCF4P90gbXery1g7MhnK 84uvvdBtt89J+YXdXltXMSRxXkVZ3ruAtSnDvifdlMHoNAQrnIbI2OzGtRC8Di4diH08 3qu02niarRgF2GvTq3WJ3PebrglTrqL8Ch/rk5yQlNbCWCD8GmGXkJtPa8WYokmDvpRT K8PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hn4oWqJb; 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 go2si6678500plb.270.2019.03.22.04.20.58; Fri, 22 Mar 2019 04:21:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b=hn4oWqJb; 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 S1728280AbfCVLUC (ORCPT + 99 others); Fri, 22 Mar 2019 07:20:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:46404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728265AbfCVLT6 (ORCPT ); Fri, 22 Mar 2019 07:19:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 8E9CD218A2; Fri, 22 Mar 2019 11:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253598; bh=LziKSwt+Dw5L7W1/cxScyx010gFulz6QLfl8dJlZxeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hn4oWqJbzdX90kpM8Zrh+sxXL9WUvbxapb5uJ9GvgRKVXMZY17azoZjHHylxMkM3a ZknhSt16eJDVox/4o8xHB8a0hH4Wqjd5O88KM9Oog+9aJxpgYWj3AzxuhHclNzDFae s3zDL6Zbw65VbS0KFBQoIy55J59RY0auYJ6s4jXo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , "David S. Miller" , Sasha Levin Subject: [PATCH 3.18 017/134] isdn: avm: Fix string plus integer warning from Clang Date: Fri, 22 Mar 2019 12:13:50 +0100 Message-Id: <20190322111211.219857374@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 7afa81c55fca0cad589722cb4bce698b4803b0e1 ] A recent commit in Clang expanded the -Wstring-plus-int warning, showing some odd behavior in this file. drivers/isdn/hardware/avm/b1.c:426:30: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] cinfo->version[j] = "\0\0" + 1; ~~~~~~~^~~ drivers/isdn/hardware/avm/b1.c:426:30: note: use array indexing to silence this warning cinfo->version[j] = "\0\0" + 1; ^ & [ ] 1 warning generated. This is equivalent to just "\0". Nick pointed out that it is smarter to use "" instead of "\0" because "" is used elsewhere in the kernel and can be deduplicated at the linking stage. Link: https://github.com/ClangBuiltLinux/linux/issues/309 Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/isdn/hardware/avm/b1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/isdn/hardware/avm/b1.c +++ b/drivers/isdn/hardware/avm/b1.c @@ -423,7 +423,7 @@ void b1_parse_version(avmctrl_info *cinf int i, j; for (j = 0; j < AVM_MAXVERSION; j++) - cinfo->version[j] = "\0\0" + 1; + cinfo->version[j] = ""; for (i = 0, j = 0; j < AVM_MAXVERSION && i < cinfo->versionlen; j++, i += cinfo->versionbuf[i] + 1)