Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2880485rwb; Mon, 5 Sep 2022 03:05:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6613OSKqcRT8OSsYu0gDg2kJXeqLAW+STau54j9BdHb38QRmndtfals1rAw1F7+91H2iI8 X-Received: by 2002:a17:903:2406:b0:174:f1c8:76bc with SMTP id e6-20020a170903240600b00174f1c876bcmr33626546plo.168.1662372335373; Mon, 05 Sep 2022 03:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662372335; cv=none; d=google.com; s=arc-20160816; b=m/LY4oV3Cqp3PAoNaT26SWx+gBaAEN9psGHLSBpXg4bn0cKr46ogAzQaci0EMmXVdu 0MpEYFsNlHO9O9HCqXC5h/8m0t6DwkJWXNKtZqK8kf10IjKgU0aI7zbkZrRmEX0OjM6Z /GjJCdskqQG4YCgfn9FTGmX6EcL2Vq3eQL7/Q6YrdS9Mlz5DkUetLb47GOviVATEZkx0 ncCPYlk1e3RSEXRtpF65V6MFaUkNsLY2JKQ+O0H7iiPSBKtZpP5i2wnQA94Lzb2NzLnX FKi3+P971DZYKTdfAEALgT/0WPZ3Bmtbt0ixSrXK8WroC4sbyQu7scdiIKWL2hdwWaSx x+MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=V8Ppwyj09q85xaTg8ZGWO0FaEaJmyYLhOcw8ge0YAgA=; b=uEtgpyuWgRqYfXLqe4DPXj0A/BOsxG1uIx2e1bLtE8Ju3MOoHm7lGHJJ3c0uAkCR4T JIGEHKjVo9Rtga4O9R+yZnt0eBsrsfKKu/wOH+rUg9hmIPFiaqsMo/KwV9/cMBCuDZlt kUbaLehqmCDfiSjCeJ8SJ2iYgEXODHii36Auxdcs+RcEehr78knhPA6xV0q2+qCBryhk V8DpJTPloPk1lpvBIL+AjJ0JjRksGnvbpqK3P8OZig4hpVGAiUugRTiACZl3gfZ2kZnp TRi/Zw85qZ/Q2uxibQtNjBmNFE2maJZl/syNud95Trl+tww4Bw2VED80RSvoHIkxxGYi pwag== 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 a18-20020a634d12000000b00430ab3a02d5si9862152pgb.138.2022.09.05.03.05.24; Mon, 05 Sep 2022 03:05:35 -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 S237093AbiIEKBO (ORCPT + 99 others); Mon, 5 Sep 2022 06:01:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235591AbiIEKBH (ORCPT ); Mon, 5 Sep 2022 06:01:07 -0400 Received: from cstnet.cn (smtp23.cstnet.cn [159.226.251.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A6C2B1F2F3; Mon, 5 Sep 2022 03:01:05 -0700 (PDT) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-03 (Coremail) with SMTP id rQCowADHQ1PeyBVjDZynAQ--.30103S2; Mon, 05 Sep 2022 18:01:03 +0800 (CST) From: Jiasheng Jiang To: gregkh@linuxfoundation.org Cc: johan@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: Re: Re: [PATCH v3] USB: serial: ftdi_sio: Convert to use dev_groups Date: Mon, 5 Sep 2022 18:01:01 +0800 Message-Id: <20220905100101.343861-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowADHQ1PeyBVjDZynAQ--.30103S2 X-Coremail-Antispam: 1UD129KBjvJXoW7urW3Zw48uF47trW5uFyUWrg_yoW8tFWfpF 43JayakFWkJFnxX342vw45X3s3tw4kJryfGr4ft34rWwn8J347GFW8Ja4UC3W8Jry8G3W7 XF4kurZIkFWrArJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r4D MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJV W8JwCI42IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbXAw3UUUU U== X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_SBL_CSS,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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, Sep 02, 2022 at 10:52:52PM +0800, Greg KH wrote: >>>> drivers/usb/serial/ftdi_sio.c | 101 +++++++++++++++++----------------- >>>> 1 file changed, 51 insertions(+), 50 deletions(-) >>>> >>>> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c >>>> index d5a3986dfee7..479c3a5caaf8 100644 >>>> --- a/drivers/usb/serial/ftdi_sio.c >>>> +++ b/drivers/usb/serial/ftdi_sio.c >>>> @@ -1107,11 +1107,40 @@ static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base); >>>> static u32 ftdi_232bm_baud_to_divisor(int baud); >>>> static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base); >>>> static u32 ftdi_2232h_baud_to_divisor(int baud); >>>> +static umode_t ftdi_sio_attr_is_visible(struct kobject *kobj, >>>> + struct attribute *attr, int idx); >>>> +static ssize_t latency_timer_store(struct device *dev, >>>> + struct device_attribute *attr, >>>> + const char *valbuf, size_t count); >>>> +static ssize_t event_char_store(struct device *dev, >>>> + struct device_attribute *attr, const char *valbuf, size_t count); >>>> +static ssize_t latency_timer_show(struct device *dev, >>>> + struct device_attribute *attr, char *buf); >>>> + >>> >>> Please work with the code so that you do not have to pre-define these >>> functions. It should be possible. Worst case, you pre-define the >>> structure for the driver, that should be it. >> >> Without pre-definition of the functions, compilation errors will occur, >> such as 'ftdi_sio_attr_is_visible' undeclared here. >> I have no idea why they are not necessary. > > If you move the code around that asks for those functions, you will not > need to define them. > Fine, I have already revised the patch and submitted a v4. >>> And again, have you tested this change? >> >> Every time I change the code, I recomplie it and check whether there are >> errors. >> Are there any other tests I need to do? > > Yes, boot with the device and make sure that the sysfs files are still > there. You do have access to one of these devices, right? They are > very very common. Sorry, I still have no idea how to boot with the device. But if there is any wrong with the patch, you can tell me and I will continue to revise it. Thanks, Jiang