Received: by 10.192.165.156 with SMTP id m28csp509672imm; Fri, 13 Apr 2018 03:07:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49rxbmIaJ/RGGkRvQ78jBQOEkuRDMeKR/JVl/8fu90Dt8N4VAc3z1EEf5e86wPQ0k9ziwoz X-Received: by 2002:a17:902:43a4:: with SMTP id j33-v6mr4667392pld.260.1523614077442; Fri, 13 Apr 2018 03:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523614077; cv=none; d=google.com; s=arc-20160816; b=U4czEBgSsbjc/YyjC08/Hc9O92cxt7rHdppouK9axVzHNSBFeZ6Evb31O2S7fiiSaO QSc/9E0li0/sTFxWtXxN11EBIS7c2vIKtHEbL06E2/2XX55MDUukUq47ARB/Jlej3VDu uN4cX/+eiaAKg4LoLa7mOXXTIhF4qKOgATJ3wiR0ZEgJrW/63S1SdgYrI2MnMcT02nk7 c2K6K8KELOJufv+qoWXmkuQOV2QyQHQ9QfStIBxvdle58IiKmUfJ50m/ibRevH9H010R wU0NROBmhAr6eeOnUhyiOu6VuaSlyJ8GiOjPurvfVLiGaETg0vFUMDgv54cxJLm7s0l2 9Npg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UqNwwKTS/+2hDOTRpz+g8Ykwl7qIRoPc5fGVYK5dPFA=; b=wwiXcNYZ4kyuIcCOqD/YYq7lv7HUK1po9I8aW8WdvnykHkxGC49MRsFMg/mZIkVKfl eQmu3ybvVvJVq/hoSNXz3cFrtkPBqjbbVkjb4Fgyw54uT+VbPJCmO7o/WAt5PzKi0nOU ZPLy0ozbkKCnH7w9uTa2eRyFq5Uujigl81KAT0piOTMoyOHD4wlb950io4jdfGA22xAk P3KNG8F9dbH7ipSzIGe/XYQpzCYZf6ktvXmXY5CW6jMszsEVn2q0D/LulZFtjoT90wav Cpc4vL2UhHHr255QMZ4ecTp6Ri8/VvOGIay+yhGLvVTJWNNjbbGLAn3sgKpDW8sZBbLZ R6qg== ARC-Authentication-Results: i=1; mx.google.com; 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 b18si4313383pfl.100.2018.04.13.03.07.43; Fri, 13 Apr 2018 03:07:57 -0700 (PDT) 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; 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 S1754136AbeDMKE4 (ORCPT + 99 others); Fri, 13 Apr 2018 06:04:56 -0400 Received: from mga02.intel.com ([134.134.136.20]:29491 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754118AbeDMKEz (ORCPT ); Fri, 13 Apr 2018 06:04:55 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Apr 2018 03:04:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,444,1517904000"; d="scan'208";a="46625565" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by fmsmga001.fm.intel.com with ESMTP; 13 Apr 2018 03:04:51 -0700 Date: Fri, 13 Apr 2018 15:39:22 +0530 From: Vinod Koul To: Geert Uytterhoeven Cc: Pierre-Yves MORDRET , Alexandre Torgue , Linux Kernel Mailing List , dmaengine@vger.kernel.org, Maxime Coquelin , M'boumba Cedric Madianga , Dan Williams , Linux ARM Subject: Re: [PATCH v2 2/2] dmaengine: stm32-mdma: Fix incomplete Hw descriptors allocator Message-ID: <20180413100921.GM6014@localhost> References: <1523457879-9869-1-git-send-email-pierre-yves.mordret@st.com> <1523457879-9869-3-git-send-email-pierre-yves.mordret@st.com> <20180413040233.GJ6014@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 13, 2018 at 10:39:48AM +0200, Geert Uytterhoeven wrote: > Hi Vinod, > > On Fri, Apr 13, 2018 at 6:02 AM, Vinod Koul wrote: > > On Wed, Apr 11, 2018 at 04:44:39PM +0200, Pierre-Yves MORDRET wrote: > > > >> struct stm32_mdma_desc { > >> struct virt_dma_desc vdesc; > >> u32 ccr; > >> - struct stm32_mdma_hwdesc *hwdesc; > >> - dma_addr_t hwdesc_phys; > >> bool cyclic; > >> u32 count; > >> + struct stm32_mdma_desc_node node[]; > > > > some ppl use node[0] for this but i think either is fine.. > > node[] is the correct one, node[0] may hide future bugs, cfr. commit > a158531f3c92467d ("gpio: 74x164: Fix crash during .remove()") Yeah but it this case it is the last element. But yes it helps to avoid such mistakes in future.. -- ~Vinod