Received: by 10.223.185.116 with SMTP id b49csp4187464wrg; Tue, 6 Mar 2018 11:15:14 -0800 (PST) X-Google-Smtp-Source: AG47ELtUrD5KjImGq9jCtFDrF0nOFtpidOef9XDZsqoae1NAIS2SFAbx8W7vNR+QGm4q0gBRGkkr X-Received: by 2002:a17:902:1a2:: with SMTP id b31-v6mr17790250plb.203.1520363714419; Tue, 06 Mar 2018 11:15:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520363714; cv=none; d=google.com; s=arc-20160816; b=Zx4UbhTf5LWjaZsfG+rtinJtAstNh68FkUWAfGrtIBKt/f/7TaUrw42BIiQP9NhNQT d5cj/EMtn/ZQnluN1Gm5vfIeZAcmZuLKHRj7gS1foouwY0frKVb3xPbTSQzlzNHAJ5ih hzNL5RIZih/DR3A7yfOCazvYdiHBtreW/KXAIvjg0TJjceGXwkfuRvK2XjBgh1Bo3m35 dXaJmFE1mwSWRyoywX3IKtxyuD5kxBaQDrWa+o/I5uqami+Louzglh3/1Wdqgz8spnb1 JyegoVoUxgnveKqI2x0WjiUXfIrlEtsBs9dfpkDmuqD0Ik//ae0TtauCK5WJ75P6dG/W tcvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zXFv5/KboWLnTrLb+/iHPAfXn/eKtcuBvMWyoG+EdBk=; b=IOiaygQtdGNUsRb8kV+Wmw7uu9jcoDYxfTrl4p1x5zHQ+OSIPLuRX8Vbp89OEdmBtW YdM/cY/Va+Mvf2pqtuFWGVQmtlEo/0Qek+v2IG2MHijI1cDPnhq+EH5orIQJmoCEl+Ia 0ABOH5C/raz5CgRibsT+DoZkPwwj3WWWWWTzXrAZqulmBIwyJC2fuf9bN7owkV4PyYk9 ACZkCQJxCmHhyFGbEdDDLLsV3w1uZdCsnm/r1UFEk4qE5ogAY0hPJl4lTeGcEij7S2KH ACuGqwi40NeGTQqXBWmnI44npE0cZN2wF8H72k08tUaG6JzhDvpnBdwaTWEgW0XHzEEm Ibrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=06LAOvOG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si10225008pgp.759.2018.03.06.11.15.00; Tue, 06 Mar 2018 11:15:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=06LAOvOG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbeCFTNi (ORCPT + 99 others); Tue, 6 Mar 2018 14:13:38 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33259 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753747AbeCFTNf (ORCPT ); Tue, 6 Mar 2018 14:13:35 -0500 Received: by mail-oi0-f68.google.com with SMTP id e9so525250oii.0 for ; Tue, 06 Mar 2018 11:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zXFv5/KboWLnTrLb+/iHPAfXn/eKtcuBvMWyoG+EdBk=; b=06LAOvOGhMdqixYhWmuduEawr96TMHAD/oIMH8cl6yBrmu7K3QKj7YoEZUWw8TlttY yJQAIkpWhq+dwrFt2lEpqxhyy38tj23G9Kn+t8GijG53hWCYeoIOJ6sg7ykKpujacEsf 7E+5IqhGJo8mc7ijZ7xf/hQB7bf7+y/sgmv1YpxgBpMjF3l3kG4TyzFE3JJGcMNDO3WY Ac40PM9/9BG+PzWI4g6j3jUPc2yLKsCHvPTInQ4x6Fs9OForxLJRh4auw5h/SMtIz+07 tyxe7Gjs2ojCGg3LyLpWjHZlrbxrXd/JR8fuJ+HUs/q1BdCho8QFN3WSPl3bcwu5NsHF BCcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zXFv5/KboWLnTrLb+/iHPAfXn/eKtcuBvMWyoG+EdBk=; b=oP4G0B6U+tWwerbnJcsFWarK5Ahl1vf/NyBDbLdcxUQOEb0Bd9ZA2iZRTq7FJs0RZ5 IzMy08Y/FYeHM88y1x5eAnqASTcFdl5SmjMzidqDGqNbiq42wpS+gZhxsX/NZr21zLWf LwN6YcAhtOrV/A1GjBVweWYRqS3jpPUNVKb7xSKeFlE3lCKl80WGNJv6Lr6JLcy/eaYI 4CtM53Jczahkq4bbrp7ZuLZF4ba/OvM2+yZAJlMedm/lk0iZo9huhU6DZVrniIyZ70CZ p17vyis0gXK28lMJK4E1xpizZjRxnTvhdCOmjEkMVBZJU3H1DsJ+w94x+95XDlfYt+md 9Kzg== X-Gm-Message-State: AElRT7EzzjE9dlBevxSmhrz/dfIGezR1e9kqe5gjN4nExYrGfPU3C24e TqGvixXAV6+I4TWSzXpdgs5MH1fTJ7iQ6LvWnBjC4Q== X-Received: by 10.202.236.4 with SMTP id k4mr12856179oih.215.1520363614502; Tue, 06 Mar 2018 11:13:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.81.137 with HTTP; Tue, 6 Mar 2018 11:13:33 -0800 (PST) In-Reply-To: <20180305184219.GA30168@linux.intel.com> References: <20180227172952.22177-1-ross.zwisler@linux.intel.com> <20180305184219.GA30168@linux.intel.com> From: Dan Williams Date: Tue, 6 Mar 2018 11:13:33 -0800 Message-ID: Subject: Re: [PATCH 1/3] nfit_test: improve structure offset handling To: Ross Zwisler Cc: linux-nvdimm , Dave Jiang , Vishal L Verma , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 5, 2018 at 10:42 AM, Ross Zwisler wrote: > On Tue, Feb 27, 2018 at 10:29:50AM -0700, Ross Zwisler wrote: >> In nfit_test0_setup() and nfit_test1_setup() we keep an 'offset' value >> which we use to calculate where in our 'nfit_buf' we will place our next >> structure. The handling of 'offset' and the calculation of the placement >> of the next structure is a bit inconsistent, though. We don't update >> 'offset' after we insert each structure, sometimes causing us to update it >> for multiple structures' sizes at once. When calculating the position of >> the next structure we aren't always able to just use 'offset', but >> sometimes have to add in other structure sizes as well. >> >> Fix this by updating 'offset' after each structure insertion in a >> consistent way, allowing us to always calculate the position of the next >> structure to be inserted by just using 'nfit_buf + offset'. >> >> Signed-off-by: Ross Zwisler > > Ping on this series. All of these look good to me, applied.