Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp576843pxb; Tue, 15 Feb 2022 22:38:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw00qqrmEUDyMblm0omkYZRzKPWc+52H5V9zwAeDdE+zIEA4AS4IoCn+8hnKXkGNDM1yxHV X-Received: by 2002:a17:902:8603:b0:14d:7ce2:3e10 with SMTP id f3-20020a170902860300b0014d7ce23e10mr1134365plo.37.1644993501030; Tue, 15 Feb 2022 22:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644993501; cv=none; d=google.com; s=arc-20160816; b=pnzAyvnff0t8gr+YyiS3ZYhBwqpFK+utRIZ1vYlnmStofQuKhVXdfkr2iL2FpgxzPQ xDCTWyaLX0XUNMAN3k5WPR6d6kJ8qgZh4gldq7zfitCviQb70s4cvD7ccY2EAjffXYVX wnbtELqEbWJ1hBlQakx7IAj7QgJdMkhqH5L/CZ2WpwjXaa3qIQ4/PAOuwJEovaQHfK6p 6mPBvBIfvBLNgaffBJrpdj3wN+4QqfRr1mmiUADlDSl1/llE0wMAqvQM7mOxeXDABkek MRLvCpnBlXdUkCS1BAjktlgUbhcu4EhUJvQFATTiPeodYI3pHR0vvhsgPQRvU9hajzW1 mwJg== 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=QVQV/xiqg6YMxF1CU+/eLLt+o8djpJMFQsl2vWph/Fw=; b=tMYv2u8jtb/JkxSfhN7xbGiSz52rH1jj9X1srHwU1aARgaLIVFNsrMHXeRN0++9ez2 dJ8aeC2ynt0X11myIqaZPysfdkOZ5sLt8Pu8ySxDjaSXhm3AciSaa4NKri7c3/bjRK0C wz8ndlriXJChQW8dimI6U87TYeycu2gxD0XrFJm81W40F1gg8Ixrmbzoy8qW01wDAwNn ticLTYxaWTWKknzR0FBaPyTwBvFLpXavejH/9mbhXHPZLy8PUAu7iLDTkREOiPyNDkcd DT64w3DfXOJUrSUkhaa6aqj4kbzdKvINVc4Xitstfpiz8o5EXQTX//oK5DBKEucjf1gW MfVg== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s11si15940631pjg.9.2022.02.15.22.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1DECD165C02; Tue, 15 Feb 2022 22:28:41 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244549AbiBOWXc (ORCPT + 99 others); Tue, 15 Feb 2022 17:23:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242417AbiBOWXc (ORCPT ); Tue, 15 Feb 2022 17:23:32 -0500 Received: from hs01.dk-develop.de (hs01.dk-develop.de [IPv6:2a02:c207:3002:6234::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34FD96FA36; Tue, 15 Feb 2022 14:23:21 -0800 (PST) Date: Tue, 15 Feb 2022 23:23:17 +0100 From: Danilo Krummrich To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org Subject: Re: [PATCH 1/4] input: ps2-gpio: refactor struct ps2_gpio_data Message-ID: References: <20220215160208.34826-1-danilokrummrich@dk-develop.de> <20220215160208.34826-2-danilokrummrich@dk-develop.de> 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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,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 Hi Dmitry, On Tue, Feb 15, 2022 at 01:54:46PM -0800, Dmitry Torokhov wrote: > Hi Danilo, > > On Tue, Feb 15, 2022 at 05:02:05PM +0100, Danilo Krummrich wrote: > > > +static inline struct ps2_gpio_data * > > +to_ps2_gpio_data(struct delayed_work *dwork) > > +{ > > + struct ps2_gpio_data_tx *txd = container_of(dwork, > > + struct ps2_gpio_data_tx, > > + work); > > + > > + return container_of(txd, struct ps2_gpio_data, tx); > > +} > > + > > static void ps2_gpio_tx_work_fn(struct work_struct *work) > > { > > struct delayed_work *dwork = to_delayed_work(work); > > - struct ps2_gpio_data *drvdata = container_of(dwork, > > - struct ps2_gpio_data, > > - tx_work); > > This can simply be written as: > > struct ps2_gpio_data *drvdata = container_of(dwork, > struct ps2_gpio_data, > tx.work); > > No need to resubmit unless you disagree - I can change it on my side. Thanks, please do so. The tx and rx members of struct ps2_gpio_data can then be anonymous structs. Do you mind changing that too? Or should I resubmit? > > Thanks. > > -- > Dmitry - Danilo