From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH 1/2] device property: Add new array helper Date: Thu, 27 Jun 2019 08:15:30 +0800 Message-ID: <20190627001530.GG527@kroah.com> References: <20190626153611.10170-1-ckeepax@opensource.cirrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C90B5F806F0 for ; Thu, 27 Jun 2019 02:15:36 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20190626153611.10170-1-ckeepax@opensource.cirrus.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Charles Keepax Cc: alsa-devel@alsa-project.org, rafael@kernel.org, patches@opensource.cirrus.com, lgirdwood@gmail.com, linux-acpi@vger.kernel.org, broonie@kernel.org List-Id: alsa-devel@alsa-project.org On Wed, Jun 26, 2019 at 04:36:10PM +0100, Charles Keepax wrote: > It is fairly common to want to read an integer array property > that is composed of an unknown number of fixed size integer > groups. For example, say each group consists of three values > which correspond to the settings for one input on the device > and the driver supports several chips with different numbers > of inputs. > > Add a new helper function to provide this functionality, it > differs for the existing helpers in that it allows reading a > smaller number of values than the full array size and checks > that the number of values read is a multiple of the group size. > > Signed-off-by: Charles Keepax > --- > drivers/base/property.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/property.h | 2 ++ > 2 files changed, 50 insertions(+) Acked-by: Greg Kroah-Hartman 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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT 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 3D69DC48BD6 for ; Thu, 27 Jun 2019 00:15:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 022A2216E3 for ; Thu, 27 Jun 2019 00:15:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561594535; bh=MJ2KaTKdJNeLe5zaJz4d4Ny22PpPk93/u2IsVDP5gTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Rx0X9WP7tG8jNGiP9DJ98sjBnn9ZZy5qtlqCRtS3lsIyn0VyeLk5/PzjHGuR/INtT VN4+xT0+0CdiNKurENoqeBXiXQSguGSyTXJ9HdSYpqrrJPS7Op03GgAm+SVdDXEtSc K5uxAmYZbgjRW/RtHdUpgz1eEpLmPyfspdU6Acn8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfF0APe (ORCPT ); Wed, 26 Jun 2019 20:15:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:56764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbfF0APe (ORCPT ); Wed, 26 Jun 2019 20:15:34 -0400 Received: from localhost (unknown [116.247.127.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 140D8216C8; Thu, 27 Jun 2019 00:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561594533; bh=MJ2KaTKdJNeLe5zaJz4d4Ny22PpPk93/u2IsVDP5gTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=w1UNaNgdiGcLVSa46TY2rC43A/omDRFx/nI+uYIIUguEafGhYmsxnoYlOhWYmzNTw 8QjTpP9GEDj0wrsc3RVvl9OutcwldNGi7gSIUqt0ESbxEucM6L1uwSlX+E6kWt6jiw BMjDWG3Z04aCiGPD2o7K/9adsHthTjAwyDYtXzE8= Date: Thu, 27 Jun 2019 08:15:30 +0800 From: Greg KH To: Charles Keepax Cc: broonie@kernel.org, rafael@kernel.org, linux-acpi@vger.kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com Subject: Re: [PATCH 1/2] device property: Add new array helper Message-ID: <20190627001530.GG527@kroah.com> References: <20190626153611.10170-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626153611.10170-1-ckeepax@opensource.cirrus.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Jun 26, 2019 at 04:36:10PM +0100, Charles Keepax wrote: > It is fairly common to want to read an integer array property > that is composed of an unknown number of fixed size integer > groups. For example, say each group consists of three values > which correspond to the settings for one input on the device > and the driver supports several chips with different numbers > of inputs. > > Add a new helper function to provide this functionality, it > differs for the existing helpers in that it allows reading a > smaller number of values than the full array size and checks > that the number of values read is a multiple of the group size. > > Signed-off-by: Charles Keepax > --- > drivers/base/property.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/property.h | 2 ++ > 2 files changed, 50 insertions(+) Acked-by: Greg Kroah-Hartman