From patchwork Fri Apr 15 10:36:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Vlasenko X-Patchwork-Id: 8847051 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 419B29F36E for ; Fri, 15 Apr 2016 10:36:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A48D2037C for ; Fri, 15 Apr 2016 10:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BEA220377 for ; Fri, 15 Apr 2016 10:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbcDOKgd (ORCPT ); Fri, 15 Apr 2016 06:36:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42287 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbcDOKgd (ORCPT ); Fri, 15 Apr 2016 06:36:33 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FC3E81106; Fri, 15 Apr 2016 10:36:27 +0000 (UTC) Received: from localhost.localdomain ([10.34.1.111]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3FAaPD4021581; Fri, 15 Apr 2016 06:36:25 -0400 From: Denys Vlasenko To: Himanshu Madhani Cc: Denys Vlasenko , James Bottomley , qla2xxx-upstream@qlogic.com, Josh Poimboeuf , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] qla2xxx: rewrite code to avoid hitting gcc bug 70646 Date: Fri, 15 Apr 2016 12:36:23 +0200 Message-Id: <1460716583-15673-1-git-send-email-dvlasenk@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP More info here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 Signed-off-by: Denys Vlasenko CC: Himanshu Madhani CC: James Bottomley CC: qla2xxx-upstream@qlogic.com CC: Josh Poimboeuf CC: linux-scsi@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/scsi/qla2xxx/qla_attr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 4dc06a13..2dd9c72 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -2003,9 +2003,14 @@ static void qla2x00_get_host_fabric_name(struct Scsi_Host *shost) { scsi_qla_host_t *vha = shost_priv(shost); + /* + * This can trigger gcc 4.9/5.3 bug. + * See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646 uint8_t node_name[WWN_SIZE] = { 0xFF, 0xFF, 0xFF, 0xFF, \ 0xFF, 0xFF, 0xFF, 0xFF}; u64 fabric_name = wwn_to_u64(node_name); + */ + u64 fabric_name = (u64)(s64)-1; /* the same as above */ if (vha->device_flags & SWITCH_FOUND) fabric_name = wwn_to_u64(vha->fabric_node_name);