Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp794226rdg; Thu, 10 Aug 2023 22:47:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0v50RnTb2oNdF/bVCpZH2hfVjdKFb+3WgCjH9H2ycsuGDUzPuEszRbOn3aHRy6GkjWqVu X-Received: by 2002:aa7:c0cc:0:b0:523:ba10:d795 with SMTP id j12-20020aa7c0cc000000b00523ba10d795mr875904edp.11.1691732836620; Thu, 10 Aug 2023 22:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691732836; cv=none; d=google.com; s=arc-20160816; b=uiBpLzdC8VvvLBJjl8PuvAz7GQtbEDgXTYorJg8MjSVd9Y7qJWBhkQKL11QmhCOohx l/dE5HeZ1zDbqXD7yY+5iQy9jW5rIW3SHtNktgs0cmlAg5tOb2JGwGo+qFlhqGK7ZAFb h7IcN6dTFqFHHmfKyEbecbtLFIJtLIrnMC7tXBNLFHbujywXLZrrDPkzue6OdhCrGkSP yONnhZO80lKRa+wgBLc9pdq9ZRAlNwP5rIFdL5xgBo30zu1nhvBuVTzI+Wpln+1QixNO f3Xm0Nd7k+iO3LGt/S2JtadUI/s8OaPXCsudAxtfT9u6RVsUn5fY3KaXISep6GZedQIz qnEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OBPlYhMl8iNrOSMh2GuWDXGkmJgKy4n9ONGrw2+P3Fw=; fh=S61hBOhJ5JehVxpLHOTSOpTjZsp1/wHbbN+pks37VNs=; b=Nqzz6VZ6OrbIIDPUzquyVy5bahkP2EH4hyoGk14WLfJ7XbVB31BY6MWt5iuCG0GK8A fHQw8jh47Ji7OEA+SCq1D2AscFebvf0PcPmTsba2u79NDRTLOMO2VULFPMYgzsHcB+TY 3wmKAckot9IGatUkXfPdlwyvJKeg4q5fjjei3PHNzM+a90QmP80fW9ExUUXX1/EikjQP 2SCFVBDAouYl0EizxNSLUWbSNyPCkfTwckoY9auo2/pRCUHxrcCviI7Lh0lFfk70eyki QxjAHTmo5pgAwyrLlybRtt1skhgATguwWSRh3ki+qEbzowLQ1rDk0yXduStUzNFkoU6E wELQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a056402028900b005222007595fsi2820723edv.87.2023.08.10.22.46.52; Thu, 10 Aug 2023 22:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbjHKFLc (ORCPT + 99 others); Fri, 11 Aug 2023 01:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbjHKFLa (ORCPT ); Fri, 11 Aug 2023 01:11:30 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 188F62D4F; Thu, 10 Aug 2023 22:11:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 11A6780A9; Fri, 11 Aug 2023 05:11:23 +0000 (UTC) Date: Fri, 11 Aug 2023 08:11:21 +0300 From: Tony Lindgren To: Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Guenter Roeck Subject: Re: [PATCH] serial: core: Fix serial core port id, including multiport devices Message-ID: <20230811051121.GL11676@atomide.com> References: <20230810065737.47294-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Shevchenko [230810 15:26]: > On Thu, Aug 10, 2023 at 06:24:13PM +0300, Andy Shevchenko wrote: > > On Thu, Aug 10, 2023 at 09:57:34AM +0300, Tony Lindgren wrote: > > ... > > > > + unsigned int min = 0, max = ~0U; > > > > Shouldn't this be int? The max IIRC will be INT_MAX with this anyway. > > Ah, and then you can supply is as 0 (IIRC). The returned id will be INT_MAX, but idr.h uses unsigned int: int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t); If there's some reason to limit max id we can do it, otherwise it's just a don't care flag. Please clarify if I'm not following what you are suggesting :) Regards, Tony