Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp958541ybb; Wed, 8 Apr 2020 13:21:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLQMlcsQ4mG63COvlQZY5MBxLhemUAc8opyPViWeI0cxFPL+xRzv5yjcWZwIQtHqjO/Xa2i X-Received: by 2002:a9d:480b:: with SMTP id c11mr6803877otf.109.1586377312235; Wed, 08 Apr 2020 13:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586377312; cv=none; d=google.com; s=arc-20160816; b=spRiHD8U2g5c5W3XMuQjiCU3xTGkox+ZmbFo+2xWvrO844x3bKuUB7SkN/XGcw290Q Pj3TBtWXKDmkgR41uqmCJhDy/VSxWJVO3XHcLL1I5o8I3bSaJy82NM+5dUnDEHUr0V2Z wdfcjBYeow4JsdLKCqa5WB3z2IAYox32CesWAgtgr8PYxsmsUJ9na4N68mm2Z8WiCZvK L/R7fKYTx0JudjC2FZ2nMevTHBkAKmXAdz5jDWITHZAlc3Vs9gdhILjuCcafKhxfiJqU xdbKyOqoo60PTT7dW5x9oJPO7+MVA1leLYFq9kZB/lcNCVogQsFIJtGyW15P7nKxlJBx yGzw== 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; bh=tjoWoqrXA59CFjyXuzVD+8TfRMbt36u7QDGVZcsgPLQ=; b=JScT8srNpsZ8OviMxjdlihH6a2eKRGFzLmObNCmyYGMix+Kj73tneimgTsc1i53EkT NCGdOepc5P+Z7iDZHSrGN2jQF8BpTdliTluDU+znxhn3ithL5ENFV01jQ8b43U7QGLNW 3cCzF9JbJBRY/mw3hDuX8xnJ8NsO/7bf4vlpAuGZN7hRuWsboWMGSzXRkx+FvpFkn9uj EotwSoYCqHWBOHmKR+WYeUydBuXs5YVqo8ivDkMFD7+nJfB7NKUSow+b1ChdbFE4dKfS 49DXts0TWJfBdsYE+v2vTkNkk6T7dT/NSx3HhlI5puozfKwY4FhPEXfUcPczju3pnpvX NBfw== 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 s139si2858649oih.7.2020.04.08.13.21.38; Wed, 08 Apr 2020 13:21:52 -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 S1728460AbgDHSuB (ORCPT + 99 others); Wed, 8 Apr 2020 14:50:01 -0400 Received: from verein.lst.de ([213.95.11.211]:43667 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728208AbgDHSuB (ORCPT ); Wed, 8 Apr 2020 14:50:01 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id C976168C4E; Wed, 8 Apr 2020 20:49:58 +0200 (CEST) Date: Wed, 8 Apr 2020 20:49:58 +0200 From: Christoph Hellwig To: Grygorii Strashko Cc: Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, Sekhar Nori , linux-kernel@vger.kernel.org Subject: Re: [PATCH] dma-debug: fix displaying of dma allocation type Message-ID: <20200408184958.GA9945@lst.de> References: <20200408184804.30522-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408184804.30522-1-grygorii.strashko@ti.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2020 at 09:48:04PM +0300, Grygorii Strashko wrote: > The commit 2e05ea5cdc1a ("dma-mapping: implement dma_map_single_attrs using > dma_map_page_attrs") removed "dma_debug_page" enum, but missed to update > type2name string table. This causes incorrect displaying of dma allocation > type. Fix it by removing "page" string from type2name string table. > > Before (dma_alloc_coherent()): > k3-ringacc 4b800000.ringacc: scather-gather idx 2208 P=d1140000 N=d114 D=d1140000 L=40 DMA_BIDIRECTIONAL dma map error check not applicable > k3-ringacc 4b800000.ringacc: scather-gather idx 2216 P=d1150000 N=d115 D=d1150000 L=40 DMA_BIDIRECTIONAL dma map error check not applicable > > After: > k3-ringacc 4b800000.ringacc: coherent idx 2208 P=d1140000 N=d114 D=d1140000 L=40 DMA_BIDIRECTIONAL dma map error check not applicable > k3-ringacc 4b800000.ringacc: coherent idx 2216 P=d1150000 N=d115 D=d1150000 L=40 DMA_BIDIRECTIONAL dma map error check not applicable > > Fixes: 2e05ea5cdc1a ("dma-mapping: implement dma_map_single_attrs using dma_map_page_attrs") > Signed-off-by: Grygorii Strashko > --- > kernel/dma/debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c > index 2031ed1ad7fa..09b85ba0c137 100644 > --- a/kernel/dma/debug.c > +++ b/kernel/dma/debug.c > @@ -137,7 +137,7 @@ static const char *const maperr2str[] = { > [MAP_ERR_CHECKED] = "dma map error checked", > }; > > -static const char *type2name[5] = { "single", "page", > +static const char *type2name[5] = { "single", > "scather-gather", "coherent", > "resource" }; To make sure this doesn't happen anymore, can you switch to named initializers?