From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH 14/15] OMAP: GPIO: Use memset for omap_gpio_reg_offs Date: Wed, 25 May 2011 16:30:49 -0700 Message-ID: <877h9el5na.fsf@ti.com> References: <1306247094-25372-1-git-send-email-tarun.kanti@ti.com> <1306247094-25372-15-git-send-email-tarun.kanti@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]:59320 "EHLO na3sys009aog115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753185Ab1EYXaw (ORCPT ); Wed, 25 May 2011 19:30:52 -0400 Received: by mail-pw0-f42.google.com with SMTP id 3so104599pwj.29 for ; Wed, 25 May 2011 16:30:51 -0700 (PDT) In-Reply-To: <1306247094-25372-15-git-send-email-tarun.kanti@ti.com> (Tarun Kanti DebBarma's message of "Tue, 24 May 2011 19:54:53 +0530") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Tarun Kanti DebBarma Cc: linux-omap@vger.kernel.org, santosh.shilimkar@ti.com, tony@atomide.com, linux-arm-kernel@lists.infradead.org, Charulatha V Tarun Kanti DebBarma writes: > From: Charulatha V > > Use memset to fill omap_gpio_reg_offs structure with 0xFFFF > instead of filling each and every undefined register offset > separately with USHRT_MAX in a given OMAP SoC. This would ease > while adding new register offsets in the future SoCs. > > Signed-off-by: Charulatha V > Signed-off-by: Tarun Kanti DebBarma This can be dropped in favor of using zero to indicate a non-existant register offset. Only the revision register needs a special case of using USHRT_MAX since zero can be a valid offset for the revision register. Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 From: khilman@ti.com (Kevin Hilman) Date: Wed, 25 May 2011 16:30:49 -0700 Subject: [PATCH 14/15] OMAP: GPIO: Use memset for omap_gpio_reg_offs In-Reply-To: <1306247094-25372-15-git-send-email-tarun.kanti@ti.com> (Tarun Kanti DebBarma's message of "Tue, 24 May 2011 19:54:53 +0530") References: <1306247094-25372-1-git-send-email-tarun.kanti@ti.com> <1306247094-25372-15-git-send-email-tarun.kanti@ti.com> Message-ID: <877h9el5na.fsf@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Tarun Kanti DebBarma writes: > From: Charulatha V > > Use memset to fill omap_gpio_reg_offs structure with 0xFFFF > instead of filling each and every undefined register offset > separately with USHRT_MAX in a given OMAP SoC. This would ease > while adding new register offsets in the future SoCs. > > Signed-off-by: Charulatha V > Signed-off-by: Tarun Kanti DebBarma This can be dropped in favor of using zero to indicate a non-existant register offset. Only the revision register needs a special case of using USHRT_MAX since zero can be a valid offset for the revision register. Kevin