From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbdFZRlz (ORCPT ); Mon, 26 Jun 2017 13:41:55 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25287 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbdFZRls (ORCPT ); Mon, 26 Jun 2017 13:41:48 -0400 To: John Garry Cc: , , , , , Subject: Re: [PATCH] scsi: hisi_sas: redefine hisi_sas_phy.phy_type as u32 From: "Martin K. Petersen" Organization: Oracle Corporation References: <1498472848-174945-1-git-send-email-john.garry@huawei.com> Date: Mon, 26 Jun 2017 13:41:33 -0400 In-Reply-To: <1498472848-174945-1-git-send-email-john.garry@huawei.com> (John Garry's message of "Mon, 26 Jun 2017 18:27:28 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John, > Element phy_type is a bitmask and it only ever has 2 bits possibly > set, and it is overkill to define as a u64, so redefine as a u32. > > This change resolves static code check complaint that "phy->phy_type > &= ~PORT_TYPE_SAS;" would unintentionally clear the high 32 bits as > well. > > Structure hisi_sas_phy is also reordered to ensure packing efficiency. Applied to 4.13/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering