Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753753AbdCJC1q (ORCPT ); Thu, 9 Mar 2017 21:27:46 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33145 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbdCJC1p (ORCPT ); Thu, 9 Mar 2017 21:27:45 -0500 Date: Thu, 9 Mar 2017 18:27:40 -0800 From: Brian Norris To: Shawn Lin Cc: Bjorn Helgaas , linux-kernel@vger.kernel.org, Brian Norris , Jeffy Chen , Wenrui Li , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH 1/3] PCI: rockchip: fix sign issues for current limits Message-ID: <20170310022739.GA130422@google.com> References: <20170308233748.54706-1-briannorris@chromium.org> <662fb87d-de80-ac96-4a25-c478956cceb2@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <662fb87d-de80-ac96-4a25-c478956cceb2@rock-chips.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 27 On Thu, Mar 09, 2017 at 04:59:15PM +0800, Shawn Lin wrote: > On 2017/3/9 7:37, Brian Norris wrote: > >The regulator framework can return negative error codes via > >regulator_get_current_limit() for regulators that don't provide current > >information. The subsequent check for postive values isn't very useful, > >if the variable is unsigned. > > > >Let's just match the signedness of the return value. > > > >Prevents error messages like this, seen on Samsung Chromebook Plus: > > > >[ 1.069372] rockchip-pcie f8000000.pcie: invalid power supply > > > > For this patch, > > Acked-by: Shawn Lin Thanks. > And I think patch 2 is not so urgent so we could just wait for your > non-WIP patch 3? Sure. I'll be resending the series with a proper patch 3 (and 4 and 5 actually) soon anyway. No changes to the first 2. Brian