Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6019740ybc; Wed, 27 Nov 2019 13:31:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ9//+xrqnMYbMRHcAcJaj6pQ8vDp0Rig+Ej8L76u1ogA0QdYfMAsm42RzvKajDO/IOios X-Received: by 2002:a05:6402:311b:: with SMTP id dc27mr11585455edb.106.1574890293181; Wed, 27 Nov 2019 13:31:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890293; cv=none; d=google.com; s=arc-20160816; b=Cs+UX0kWKyIXBTq949wEBAFBn7bH4MOAknCFLl0j+R1lEmk059ALG8nEA7LRfOlJXt 6ZdTZAdUA6eHIxtMkQgWAY7dGOr8sZOCwXXUSzLcMEzhpoyq0ZetRJZlcz+UZOPmfgcL cDYPynI3K5If7oVx4SLiJm3OOjICozmjsEZgR+mCRBnNnsxwHHIV0KkcMtsxMUx4mbzE 27dSf+r8av5pyn3J3nOukS0B6A6RqsRpvpTSunE6y3qoNLEWdeYZBcLKs7YLouPhPzeG 89gu57jcafXXGdOJ8Yp0Q9F6signfCh828//l1NvOR557GenXINW5dXa9otnLEarwV9Z 3j4g== 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=trSpNwc2nVq5u/nW7p/wgXSmMMtVAl0EaYgB8HBEGo0=; b=qJwUMd3JZswWvHxsltYJHszP8HMyLzVK0aImEkSpiXiF8rq1vwBCvVtyvcOPZ9a4o/ cvMukYDJ8n2uvBcRzVpCpztMw40JMoHFdLxCst8GW7tdvM5Nu7CWL5xkBvVOvEpm1bwK X+q4csSGNnNooMJiHHVVLnmXpXYE+KV7L+XQ4C3NbuKP8qYcl79Sej4y4gxv5v85Rku9 /l8hR2e/v77gEymQ2WJywUDpA7HiUQoed7e8f40NzE28rgj6hMZ5znp352X1mYK6P9oi J+gVSnsY7CjEH97ZVHR65CBTFIZVHIEspT5LqQM4brdGpch4LWkwv3o+xFNIfuTFvk6G bgsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kAMYx9Cv; 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 o64si91267eda.150.2019.11.27.13.31.09; Wed, 27 Nov 2019 13:31:33 -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=kAMYx9Cv; 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 S1731258AbfK0V3A (ORCPT + 99 others); Wed, 27 Nov 2019 16:29:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:49138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731251AbfK0U56 (ORCPT ); Wed, 27 Nov 2019 15:57:58 -0500 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 6C5D12084D; Wed, 27 Nov 2019 20:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888277; bh=94EP+6CJbPi2gxqtqgE+/k68giV31iWUvYrmgWMNFuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kAMYx9CvqBgv4JxE839cC63X32H4azKVa+qe3X1gmd2qtxs4myfkTE8/vxNQdQRvg rtGILbUFhyerKl3/QvYRdNZrzcKb5SpWeLqMIWXlmwDZFLIpim8nXl6ZCX8gm81dnx 0c2Tc/5kFBHMOjjbw3WseI/B+oRrcWEdLhKXDt+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 072/306] scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_event Date: Wed, 27 Nov 2019 21:28:42 +0100 Message-Id: <20191127203120.087313433@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Nathan Chancellor [ Upstream commit 761c830ec7b3d0674b3ad89cefd77a692634e305 ] Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/bfa/bfa_fcs_lport.c:379:26: warning: implicit conversion from enumeration type 'enum bfa_lport_aen_event' to different enumeration type 'enum bfa_ioc_aen_event' [-Wenum-conversion] BFA_AEN_CAT_LPORT, event); ^~~~~ The root cause of these warnings is the bfad_im_post_vendor_event function, which expects a value from enum bfa_ioc_aen_event but there are multiple instances of values from enums bfa_port_aen_event, bfa_audit_aen_event, and bfa_lport_aen_event being used in this function. Given that this doesn't appear to be a problem since cat helps with differentiating the events, just change evt's type to int so that no conversion needs to happen and Clang won't warn. Update aen_type's type in bfa_aen_entry_s as members that hold enumerated types should be int. Link: https://github.com/ClangBuiltLinux/linux/issues/147 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/bfa/bfa_defs_svc.h | 2 +- drivers/scsi/bfa/bfad_im.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h index 3d0c96a5c8735..c19c26e0e405e 100644 --- a/drivers/scsi/bfa/bfa_defs_svc.h +++ b/drivers/scsi/bfa/bfa_defs_svc.h @@ -1453,7 +1453,7 @@ union bfa_aen_data_u { struct bfa_aen_entry_s { struct list_head qe; enum bfa_aen_category aen_category; - u32 aen_type; + int aen_type; union bfa_aen_data_u aen_data; u64 aen_tv_sec; u64 aen_tv_usec; diff --git a/drivers/scsi/bfa/bfad_im.h b/drivers/scsi/bfa/bfad_im.h index e61ed8dad0b4f..bd4ac187fd8e7 100644 --- a/drivers/scsi/bfa/bfad_im.h +++ b/drivers/scsi/bfa/bfad_im.h @@ -143,7 +143,7 @@ struct bfad_im_s { static inline void bfad_im_post_vendor_event(struct bfa_aen_entry_s *entry, struct bfad_s *drv, int cnt, enum bfa_aen_category cat, - enum bfa_ioc_aen_event evt) + int evt) { struct timespec64 ts; -- 2.20.1