Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754999Ab3FKMjh (ORCPT ); Tue, 11 Jun 2013 08:39:37 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:60999 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960Ab3FKMjf convert rfc822-to-8bit (ORCPT ); Tue, 11 Jun 2013 08:39:35 -0400 MIME-Version: 1.0 In-Reply-To: References: <201306111328.52679.heiko@sntech.de> <201306111329.32749.heiko@sntech.de> <201306111406.14850.heiko@sntech.de> Date: Tue, 11 Jun 2013 15:39:34 +0300 Message-ID: Subject: Re: [PATCH v3 1/7] clk: divider: add flag to limit possible dividers to even numbers From: Andy Shevchenko To: =?UTF-8?Q?Heiko_St=C3=BCbner?= Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Mike Turquette , Seungwon Jeon , Jaehoon Chung , Chris Ball , "linux-mmc@vger.kernel.org" , Grant Likely , Rob Herring , Linus Walleij , Devicetree Discuss , Russell King , Arnd Bergmann , Olof Johansson , Thomas Petazzoni Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 777 Lines: 25 On Tue, Jun 11, 2013 at 3:37 PM, Andy Shevchenko wrote: > On Tue, Jun 11, 2013 at 3:06 PM, Heiko Stübner wrote: >> Am Dienstag, 11. Juni 2013, 13:51:56 schrieb Andy Shevchenko: >>> On Tue, Jun 11, 2013 at 2:29 PM, Heiko Stübner wrote: > This variant I think fits: > > if (!(divider->flags & CLK_DIVIDER_EVEN)) Oops, without "!()" of course. > return div < 2 || div % 2 == 0; > > You check for feature and do accordingly. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/