From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A96BDC11F68 for ; Thu, 1 Jul 2021 01:51:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FF9861469 for ; Thu, 1 Jul 2021 01:51:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238467AbhGABx3 (ORCPT ); Wed, 30 Jun 2021 21:53:29 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:56679 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238457AbhGABx2 (ORCPT ); Wed, 30 Jun 2021 21:53:28 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1625104259; h=Content-Transfer-Encoding: Mime-Version: Content-Type: References: In-Reply-To: Date: Cc: To: From: Subject: Message-ID: Sender; bh=O3dYctqNkA2iDLlLNcFRYr4tGQrg3CF6yd9KGFfYv5s=; b=osIK9eAv+x6+OUkVg180x96c0lLuGEOW9iqMpNzDZEhvCN/3cTHjkGkWIl3PlbvJUdM4U3HD 4sWhRY1g9tcqyTZu6vCFzgvOt86jC8Dm9A9O02nbgXlj/1Xq6LD7P+/JNV5+IJBzFLKr3Uzw bXxxJCMGvxPR1cncKxbv9sP58d0= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 60dd1f6f3a8b6d0a450185f8 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 01 Jul 2021 01:50:39 GMT Sender: hemantk=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D42A2C43146; Thu, 1 Jul 2021 01:50:38 +0000 (UTC) Received: from hemantk-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hemantk) by smtp.codeaurora.org (Postfix) with ESMTPSA id AE199C43143; Thu, 1 Jul 2021 01:50:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AE199C43143 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=hemantk@codeaurora.org Message-ID: <1625104231.10055.19.camel@codeaurora.org> Subject: Re: [PATCH v3 1/2] bus: mhi: Fix pm_state conversion to string From: Hemant Kumar To: Paul Davey , Manivannan Sadhasivam Cc: Bhaumik Bhatt , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 30 Jun 2021 18:50:31 -0700 In-Reply-To: <20210629035357.11091-2-paul.davey@alliedtelesis.co.nz> References: <20210629035357.11091-1-paul.davey@alliedtelesis.co.nz> <20210629035357.11091-2-paul.davey@alliedtelesis.co.nz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Tue, 2021-06-29 at 15:53 +1200, Paul Davey wrote: > On big endian architectures the mhi debugfs files which report pm > state > give "Invalid State" for all states.  This is caused by using > find_last_bit which takes an unsigned long* while the state is passed > in > as an enum mhi_pm_state which will be of int size. > > Fix by using __fls to pass the value of state instead of > find_last_bit. > > Signed-off-by: Paul Davey Reviewed-by: Hemant Kumar -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project