Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10729053rwp; Fri, 21 Jul 2023 04:11:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKqVqIekuStTGBolr07zuW7N2w2hWJic9a/CVuptDhESgXKjkgfGGfnlRdD0c3avCGKXfT X-Received: by 2002:aa7:d849:0:b0:51e:d76:25b2 with SMTP id f9-20020aa7d849000000b0051e0d7625b2mr1236164eds.29.1689937893961; Fri, 21 Jul 2023 04:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689937893; cv=none; d=google.com; s=arc-20160816; b=rsqbC1rbUIWLD+OpBnznHXVOPoK8T6HJzEjpKVlcSHZqYuQRKbJdh9eJibMSKgu3kZ HPpXZauz7OWxZ1FJhKwnSC6VLi+EpjxrwbvePjuvPGJxoFDySUO+uFYU/aMwgqLzfc3k hWD/8bD9er0jJKPWqS2/+l4xE6ChtBPGUoX0Ncip18n7oRiDsWw+LH0dx2t8Gumk+Skk ZZVHsZg1uv6BfAZNBmrknl4Kb7Ba/4MuNbsI+QOJVxPyh1hbrFaTSEWxPczqgc5EWg9k 4oKcvcYZ+5N3jgs9lNjNBRA3MIJDM7n9gytApoBk61FjO2VpaFEcXHfxUc9Co8qOuGCN CJQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=O8mZRjdfolMAbW01o/YcobZkh4bGpT5nYD/6xmWRQ4k=; fh=dft2B8qjgjj6kIWAfP+vTAz1rW9jKuuGzi8xgWnr1DE=; b=VBXpNPf9bwZWY56WDMPPHY5/gcdCvkYad0b11k+IuE5vZLp3gAY60vjyul7EbgnrXV KbsJkNlnqM3LmGfhjkItJIGdqSxL5BMjlNFVBj6WzUG8U2UdvhIZ3NkIalkzLVmywMaS Bbaq8rl/v3RyiJucb9VHELF5Q079Evqc5qxgdEG2vsbh8Ma7gGXAb8WZ9xQKiBJWcWa7 vF0CRuGkztB7tkhLEqptGV1bHKA5CkEIcuvG6kb6OnNgdIJonNVx7a7QxCJpPS6VLKzz mixU6Xcp7O8TUKs3XiLjPF4oKbF0WEAj/a/M8eUHkLpq5CUv6kNqooCikzVQoIXqQDJR Qc+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Zs2ia3kz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc25-20020a056402205900b0051bfa6da365si2123463edb.585.2023.07.21.04.11.09; Fri, 21 Jul 2023 04:11:33 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=Zs2ia3kz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjGUKfz (ORCPT + 99 others); Fri, 21 Jul 2023 06:35:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjGUKfv (ORCPT ); Fri, 21 Jul 2023 06:35:51 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D90E4C; Fri, 21 Jul 2023 03:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689935750; x=1721471750; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=L/NJ/w10IQWUlEjyQLiO2uYOGxQAL9QJNmq1vUB6K94=; b=Zs2ia3kzcbfkEdy3u7PEylQ31UpjU/azrllNlQjCMaCZPf87Mob0S0Ps voUKC0c2Zb56wF/1X78+Uv8cUuNvTxO4ZXNASavgAoRZKuEEYnxgk+Ftr 8wy864u1MK/eGYsn4yPXr8AxqfE5r40REaB/PoJ4u8NbKHcp2m3ep4qZZ ErGUMV/arTbq//2C3har9VaPfs0burOdpv7LdFXaZ528aABayFHLAsFLx 9lha/XX7xk0sz87OrY4NMVyBplPX526jBglPe6bixUEnopiqQY2mmGkNh 4W/kXnHGIbmj+afGY2F3iADbYBFD+MtrHZADmnKN2lnL1C/h2GoA0Kh1t g==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="364456802" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="364456802" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 03:35:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="868201893" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2023 03:35:48 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qMnU9-000Inx-2u; Fri, 21 Jul 2023 13:35:45 +0300 Date: Fri, 21 Jul 2023 13:35:45 +0300 From: Andy Shevchenko To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH v3 3/3] serial: core: Fix serial core controller port name to show controller id Message-ID: References: <20230721072147.59121-1-tony@atomide.com> <20230721072147.59121-4-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721072147.59121-4-tony@atomide.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Fri, Jul 21, 2023 at 10:21:42AM +0300, Tony Lindgren wrote: > We are missing the serial core controller id for the serial core port > name. Let's fix the issue for sane /sys/bus/serial-core/devices, and to > avoid issues addressing serial ports later on. ... > + if (type == &serial_ctrl_type) > + return dev_set_name(dev, "%s.%s.%d", type->name, > + else if (type == &serial_port_type) > + return dev_set_name(dev, "%s.%s.%d.%d", type->name, > + dev_name(port->dev), ctrl_id, > + port_id); > + else Redundant 'else' in both cases. > + return -EINVAL; -- With Best Regards, Andy Shevchenko