From patchwork Tue Jun 7 17:48:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9162147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB14B60571 for ; Tue, 7 Jun 2016 17:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B06872833E for ; Tue, 7 Jun 2016 17:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A507D28354; Tue, 7 Jun 2016 17:48:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3493B2833E for ; Tue, 7 Jun 2016 17:48:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755804AbcFGRsi (ORCPT ); Tue, 7 Jun 2016 13:48:38 -0400 Received: from mga09.intel.com ([134.134.136.24]:15630 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754899AbcFGRsi (ORCPT ); Tue, 7 Jun 2016 13:48:38 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 07 Jun 2016 10:48:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,434,1459839600"; d="scan'208";a="715366180" Received: from black.fi.intel.com ([10.237.72.93]) by FMSMGA003.fm.intel.com with ESMTP; 07 Jun 2016 10:48:35 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4DC6513C; Tue, 7 Jun 2016 20:48:34 +0300 (EEST) From: Andy Shevchenko To: linux-pci@vger.kernel.org, Bjorn Helgaas , "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/1] PCI / PM: enforce type casting for pci_power_t Date: Tue, 7 Jun 2016 20:48:33 +0300 Message-Id: <1465321713-146178-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When cast pci_power_t type of variables a static analizer tool complains on that. include/linux/pci.h:119:37: warning: cast from restricted pci_power_t Enforce type casting to make static analizer happy. Signed-off-by: Andy Shevchenko --- include/linux/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index b67e4df..8d74834 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -116,7 +116,7 @@ extern const char *pci_power_names[]; static inline const char *pci_power_name(pci_power_t state) { - return pci_power_names[1 + (int) state]; + return pci_power_names[1 + (__force int) state]; } #define PCI_PM_D2_DELAY 200