From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161693AbcE3QjW (ORCPT ); Mon, 30 May 2016 12:39:22 -0400 Received: from mail-bl2on0122.outbound.protection.outlook.com ([65.55.169.122]:10704 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161220AbcE3QjV convert rfc822-to-8bit (ORCPT ); Mon, 30 May 2016 12:39:21 -0400 X-Greylist: delayed 909 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 May 2016 12:39:20 EDT From: Yuval Mintz To: Arnd Bergmann CC: David Miller , Manish Chopra , Sudarsana Kalluru , netdev , linux-kernel , Ariel Elior Subject: RE: [PATCH] qed: fix qed_fill_link() error handling Thread-Topic: [PATCH] qed: fix qed_fill_link() error handling Thread-Index: AQHRuopr8dM2Bm5F7kKDXFvV0ks9JJ/RqZeQ Date: Mon, 30 May 2016 16:24:07 +0000 Message-ID: References: <1464623197-2084229-1-git-send-email-arnd@arndb.de> In-Reply-To: <1464623197-2084229-1-git-send-email-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=qlogic.com; x-originating-ip: [31.168.140.228] x-ms-office365-filtering-correlation-id: 4073e239-6335-4e84-ee59-08d388a6d36f x-microsoft-exchange-diagnostics: 1;CY1PR1101MB1146;5:HxflLj7ROg7HCj8K9NIoC0epZ7FchBZLb5+imOEVYOeg7dm3Qz4NBA+szuvAiRm0vz2DK8PPS+3qV/seKDSZqr6gPiBt4yg8YYL6dmrFwOHUQ0dTGi9a5qhR4jjpiCtPm7btoLSRZ5WkV7c38c0+Kg==;24:BkofoDdfkn6eAKL3myypQFXZM7MZB8YE+vi7TUyL+oMoarFO6g1ax+FQr6FTYuB7B9qRxAECRcQQoTwWfF692IZfWd6fhobEbZyUhRMRvl4=;7:VooKFfmEYhXnX1O0FxmiLcYAttj3mfZ82rj4c7DllWqsIu0Le8Y2M32sEGADGkdneA89rJfxchn5s8tBheP9rBWb66LXEEM3Padr5wy5oF8oFvEOhTCKvXJP7E8DxEDsHn/3fFK5laZbU2EBSHTEz7iztSCUXD9w7la4pELu+KSzlD0rZ6zZIXPq7eyC5zBR;20:PWY2fFssfbXw66BDdYsfNxf2orRO7fX5LpkexwV2DQAzdfA9r1IvT6Xd9LyAjm9IYaOQYVTsOzWUwI3szXO8892dOiIlKrt7/eQ+wsvMNIZK+/3wsGtvgmhrlvDDShIRBrk69p8KJS9iD/Etb8e7LiAR7MpfS4+WX5/dukuC//Q= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR1101MB1146; x-ld-processed: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:CY1PR1101MB1146;BCL:0;PCL:0;RULEID:;SRVR:CY1PR1101MB1146; x-forefront-prvs: 09583628E0 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(33656002)(8936002)(1220700001)(66066001)(74316001)(106116001)(4326007)(5004730100002)(11100500001)(5002640100001)(107886002)(110136002)(5003600100002)(10400500002)(4001430100002)(2906002)(86362001)(3660700001)(92566002)(189998001)(87936001)(3280700002)(76576001)(2950100001)(2900100001)(9686002)(77096005)(81166006)(3846002)(102836003)(6116002)(50986999)(76176999)(54356999)(8676002)(122556002)(586003)(99286002)(5008740100001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR1101MB1146;H:CO2PR11MB0088.namprd11.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: qlogic.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2016 16:24:07.8586 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR1101MB1146 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + if (IS_ENABLED(CONFIG_QED_SRIOV) && !IS_PF(hwfn->cdev)) { > + qed_vf_get_link_params(hwfn, params); > + qed_vf_get_link_state(hwfn, link); > + qed_vf_get_link_caps(hwfn, link_caps); > + > + return 0; > + } The IS_ENABLED here seems a bit wasteful to me - we have empty implementation under qed_vf.h just for this case [I.e., that SRIOV isn't enabled for qed]. If all we're trying achieve is removing these gcc warnings, I think we can simply memset the structs in the currently-empty qed_vf_get_link_* functions.