Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1595612pxv; Fri, 23 Jul 2021 12:12:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzT+tRAp7tnEVMX6Jgd9+A53wK+Ry/7vgdx5zUr2OfvBxiOa6vHAr02RUnXSvGDLaoR/cS X-Received: by 2002:a02:9626:: with SMTP id c35mr5315754jai.84.1627067540140; Fri, 23 Jul 2021 12:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627067540; cv=none; d=google.com; s=arc-20160816; b=SYa5EKkbz1nxTIM4sp7qVq+PhuCq0+UiFu0LKArLblCDFuq8M8xbv2HT0Wd6oQOkYi GCeTUFUlibOFd9KpmxLIeeT0Ozcdp9Az8m6OasMsQjKmL+vagxIkkLL0TANc4HndF2IV OvkiUl/mozeZEazZd85+N5dc7NdokFJ5ICVHOpORtINvbnRx2Al5vba8ISOhCNccKyQq Edy1ALTfXWn4YbqJg0xn+/D+xUTYhEaIrrma3gcz7sDLX6vAt2eaa91h4GdBBHC3paVc 9u1ksbM/GHHb/VzQJtyI0UM63tz/Lt8ZYDCi3vZ+fNvab3GEGD2jec0RRNsfVeYqq19T CoSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=VIGvzte5CzsEV5gUg14MwfwNPOM8EaGat6yg2AHKOaM=; b=zQwlWL3usM/slei5NOApHVL6kq8bE2/jKp/FpW6QkPoUzUpzggppbF/QVmY9Cm8zAs y2YAP31PRx8ITwXMMWNWhmQXKsJFiGypocjvON6FUQZMSMXaT7Ja4+3PpT96d+7p5RyE 4M0V+A9g700eV5zmCr0DZS1i2rzRA8hO4HE+uBIncDyVbOex4wgieiAP4XddLjbLJ1Tz RhHcZtitTvZXECgbqq03zIJlFyRNeCl2fZJYZkzVsUxyzRtrG801F/xesKhmFYADKBtn zLjquMzaLTmxokCbp0u4Gc2krD0fl5+cT02vlOuhLID2Kx86HAwplwzUPnb8rI931skk g5pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si7068484jak.67.2021.07.23.12.12.08; Fri, 23 Jul 2021 12:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbhGWSam (ORCPT + 99 others); Fri, 23 Jul 2021 14:30:42 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44983 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbhGWSam (ORCPT ); Fri, 23 Jul 2021 14:30:42 -0400 Received: (Authenticated sender: hadess@hadess.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 39DFE40002; Fri, 23 Jul 2021 19:11:11 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3] HID: logitech-hidpp: battery: provide CAPACITY property for newer devices From: Bastien Nocera To: Hamza Mahfooz , linux-kernel@vger.kernel.org Cc: Filipe =?ISO-8859-1?Q?La=EDns?= , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Date: Fri, 23 Jul 2021 21:11:11 +0200 In-Reply-To: <20210723185720.29314-1-someguy@effective-light.com> References: <20210723185720.29314-1-someguy@effective-light.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.2 (3.40.2-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-07-23 at 14:57 -0400, Hamza Mahfooz wrote: > For devices that only support the BATTERY_VOLTAGE (0x1001) feature, > UPower > requires the additional information provided by this patch, to set > them up. > > Signed-off-by: Hamza Mahfooz > --- > > v2: use ARRAY_SIZE() and set voltages[]'s size to 100 > > v3: add a check to ensure that exactly 100 elements are in voltages[] > --- > > +       BUILD_BUG_ON(ARRAY_SIZE(voltages) != 100); Sweet! Reviewed-By: Bastien Nocera