Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp733002ybc; Sat, 16 Nov 2019 07:45:22 -0800 (PST) X-Google-Smtp-Source: APXvYqz+1ZilNy7qYJCJqOb/Wtqj1fdBrCA4jFI+u4eUVklhKw+NxyYxvzQT/izWynnc8By5myOs X-Received: by 2002:a17:906:7c5:: with SMTP id m5mr10572726ejc.231.1573919122617; Sat, 16 Nov 2019 07:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919122; cv=none; d=google.com; s=arc-20160816; b=JYflvMn0/ju1oxU50oTtAg/XnZLwDUW/AEDL6DQgvlDxsW7udfV916cXPX+w7KrR9r 8+zOd5arp8Gf81+YlEQOcWRDy30NIUwK29+pvjMsBvuesVDqTxGAaQSsXJdE9mn7xnGg vAeZDYSdMkzbFB4iSgDpU1KbpCSm8h4G9hUe6dl3BoracyPli0VV14uxv5VoOQIlbKq4 XBDu/EPDXc4HYLYtrSQAgHpzQkv2te0fJQ+KFxOVMo2K39X894uO0LFmwVJs/OfAPvL1 Q3gyELDp3fzhYa3KNrWL00xGNrt2cUkRvFyoVtf028BOGlDNy61lKi3O0ZaKqR5+6Rd8 320g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WJJ/EwHnVcVaKx3xVTgOe4Z4t3HpLd5HpBVsueCjEsc=; b=oyGzKxZj76hwwJbsHcxDxf1A6WYgHWlCUrMwl7czkbO0S6sERq/tZayTtLABdjJ52z Q6ErXghHiyok4cQRgXqhq3irtQaoO8YIubk8vnh5AM9SHPakebylzxJGDNdl64j+CQRf AnYH73HlHZCLJztyXz/517F7//ronfBmpurtwyXs2n3z8p2TVJLvxBwowt2rjBVQmQFc yYOmP/eOW+sYQS/Ijd+ycuS4M120OGGbwSaj/sOJaHKmqa2WKvvkj/bPvUWG2qhwr214 giiOQx4mGE0wam1RtfvmKar6wBGmjQPZnKEexI56aNrK04yXwrqeFg5WC8ZNMdQNc7S9 zofg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hX0PBoM8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x50si9315596eda.155.2019.11.16.07.44.56; Sat, 16 Nov 2019 07:45:22 -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=hX0PBoM8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728220AbfKPPmO (ORCPT + 99 others); Sat, 16 Nov 2019 10:42:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:45626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728168AbfKPPmI (ORCPT ); Sat, 16 Nov 2019 10:42:08 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 425A520815; Sat, 16 Nov 2019 15:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918927; bh=0kjC/bhYkd5uVA3EYta0Z8i5/4EmS3pkzPHQm41NAXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hX0PBoM8HJQK/5/49MCl7WJmMYSs8fzuljEdJvtlVuWvnugttNdEXcDQYq+iGeCtu RiJqFfVogwb7fQ9EySFyoa939O1jj5EIv+i8LnmbsiEbVlCiTMAh0ov6NyUJ3Rd6HL 0Y2OqNy9evgVwnWwUnUTmDq1F5wM6nmMowNXC42s= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Nick Desaulniers , "Martin K . Petersen" , Sasha Levin , open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 4.19 054/237] scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param Date: Sat, 16 Nov 2019 10:38:09 -0500 Message-Id: <20191116154113.7417-54-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 20054597f169090109fc3f0dfa1a48583f4178a4 ] Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/iscsi_tcp.c:803:15: warning: implicit conversion from enumeration type 'enum iscsi_host_param' to different enumeration type 'enum iscsi_param' [-Wenum-conversion] &addr, param, buf); ^~~~~ 1 warning generated. iscsi_conn_get_addr_param handles ISCSI_HOST_PARAM_IPADDRESS just fine so add an explicit cast to iscsi_param to make it clear to Clang that this is expected behavior. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/iscsi_tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index b025a0b743417..23354f206533b 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -800,7 +800,8 @@ static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, return rc; return iscsi_conn_get_addr_param((struct sockaddr_storage *) - &addr, param, buf); + &addr, + (enum iscsi_param)param, buf); default: return iscsi_host_get_param(shost, param, buf); } -- 2.20.1