Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1698389pxb; Wed, 9 Feb 2022 02:30:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPEORKeTxeH3wH8zI2h/UuOeNFVUU/RCZDkuUGybAsCE5+6nTYVcK5Y/eWCXZP5WINQHX7 X-Received: by 2002:a17:902:d4ce:: with SMTP id o14mr1533237plg.39.1644402629047; Wed, 09 Feb 2022 02:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402629; cv=none; d=google.com; s=arc-20160816; b=WScG0wD1LkvsipQ0gmjb1JLsianc8/TbXjvhawWnLp5A6Oe2T1zGCMVTyWBMu1w31E Z8p0rOMCq774D3fav3UQgRSLS3wTSX7UFKh8ku8BLWNMunIKU2uERILp2j3XAgTsaMa0 i5QF4IISvmsnPLZl1Tw2iWy/vNJZmyN/6Sw5zwFOik9oRxgjAjlO6XCkWkzD2v8Nvct/ Ph7++aGKtcId4+h89Yg3YEJrxCw7MzCE9/Iu2MrkSnWYl4BFtMV7YizsvOFMgdj3Z/IM PDjh8INcNPUh5T0y3HMBGvihKWaIkA+lr6FRlGANjQJt3rKR1F4efk/wzNeITttcd6XB iTAg== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=vDi2E8BANFs+13S8+0WoQZpox6kWfk+R24wzcO2N1jw=; b=xcBLOF5nmmJxGfqnSiICOGJmNyw1DwraGwqr7znXd3OPmdxQMKfS8YMD/jbPmXXFYn K0CDROD8Ommojijj39KQrQBIsxNClXP84AUHsHKLGS6f1OFXuOaE2nyZGq7lRZc3Db48 VEJN9vTt5BQYu3myB5i8sI/8EJ3UlquaGWaPumq+OBOI1AFUUDYh27GUi8sYgQSA/XFB HLbLxCpa+XXh7TfQNJqXpFMejjchGtV8dtBjXi8vM8aKMiXnITXXR8yXzbL7yGsx0owv cBApYhYXrcWQSA2P0fIp+q/BrDJS9WkJr1ymGC3T4mtj2VpLzdyj/xp4m8piv3/+MALO D14A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoisBKdh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 195si15049405pga.530.2022.02.09.02.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:30:29 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FoisBKdh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E326AE036C1A; Wed, 9 Feb 2022 01:21:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242772AbiBGSB2 (ORCPT + 99 others); Mon, 7 Feb 2022 13:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345594AbiBGR4Q (ORCPT ); Mon, 7 Feb 2022 12:56:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC8B4C0401DA; Mon, 7 Feb 2022 09:56:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 558F8612BB; Mon, 7 Feb 2022 17:56:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74A51C340ED; Mon, 7 Feb 2022 17:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644256574; bh=SANjoCEm5kIk2iYwDmF0EMyYaL+ckA+vB+vCWwoqZao=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FoisBKdh4WEnfYjYijAslo2CpIoX0V+mvU5jDEKDuOgfA7XKAR5QCtbwj3KJIFQZZ 3dqFio0QV5hLS7gQTnl7dLRZa6of+rdIAhucU3AQc5VS0/8ktfwKXl3w1eG00F4R5T XDbdmscu1sq9uItSj/Osncul+SwCDv+pd/14QZtC6JJJMoU1Dp1teWv4RpYtpAUhdA M0kuls1+htEJC4MYnXddf/UfDQ/61W+5H5M+9rPDCIf5CmyF3/7vExwYnE7F5vWKde GmSxUVwresGVIZp71Sx53f7O1U9X3Y1GXbOtvXi+8tivVG4FSxw3eLX/rGSsMhx5zF DkyKIr7S6Kp5Q== Date: Mon, 7 Feb 2022 11:56:13 -0600 From: Bjorn Helgaas To: Li Chen Cc: Greg Kroah-Hartman , Kishon Vijay Abraham I , Lorenzo Pieralisi , =?utf-8?Q?=22Krzysztof_Wilczy=C5=84ski=22?= , Arnd Bergmann , Bjorn Helgaas , linux-pci , linux-kernel Subject: Re: [PATCH V6] misc: pci_endpoint_test: simplify endpoint test read and write operations Message-ID: <20220207175613.GA404082@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17ed3719e68.113a2df6350634.5087699168706664746@zohomail.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, Feb 07, 2022 at 04:09:05AM -0500, Li Chen wrote: > From: Li Chen > > Introduce pci_endpoint_epf_transfer_data to simplify > read and write operations. > > Also tabify this file. Thanks for the patch. This doesn't apply cleanly on v5.17-rc1. Please make it apply cleanly there or at least mention where it *does* apply. Please separate the whitespace tabification changes and the pci_endpoint_epf_transfer_data() changes into two separate patches. When they're mixed together, it's harder to review the patch. > #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \ > - miscdev) > + miscdev) Always indent with tabs when possible: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=v5.16#n18 Hmm, coding-style.rst is unfortunately not very explicit about that. But it's obvious from the existing code in this file that things should not be indented four spaces, as you did in pci_endpoint_test_transfer_data(). Your patch should match the style of the existing code. > +static bool pci_endpoint_test_transfer_data(struct pci_endpoint_test *test, > + unsigned long arg, const int operation) > +{ > + struct pci_endpoint_test_xfer_param param; > + bool ret = false; > + u32 flags = 0; > + // if we ask rc to write to ep, then ep should do read operation, and vice versa. Please use /* */ comments to match the prevailing kernel comment style: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=v5.16#n598 And spell out or at least capitalize "RC" and "EP" since they're not real words. Bjorn