Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5464993ybe; Tue, 10 Sep 2019 04:14:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0b+OVZ8v8oFeaRXTckaekbGYH2/3XDDI0w6HsTfA5lajgbht3ks/iiKxv9qo5JWkhkUIJ X-Received: by 2002:a50:8dcb:: with SMTP id s11mr5649024edh.27.1568114050127; Tue, 10 Sep 2019 04:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568114050; cv=none; d=google.com; s=arc-20160816; b=KbkTDw3qtY2O3ibTbJQTNlhxbfyqbiB3bIwVdxz5dEh3ve6ChlbBe/tTImWhGPhonz MxeQLKTMWn65ldB0TpI2Kwsl5X7AZT+6FpPJuBIkQGpclvtMK1wl6CJT0/yV0jvck2xo FXN2i7FU5nixjYykNT29+VkHZSBZs/9E15hTqf6S7Ktda/Hrmkdmvw6RyFPaHyP92+lW WshSD/EUuejq6HZ3TUxXKPlR3bqGNgGaCbhtAYlvAIfQ7oel6bTtlNkp8Trz3HfG0O1J YMqyAlgzyybBUqx7C8GQoUJwZIpe9FuGO9tsW45r11RGaZVyVia3klfwtRgRk8YiOuya TQPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=qhrJHNazfc5CMwtBCfE9AmHbBpmQjdMCtB10M++D6ZI=; b=ndU+OMz40JwSJjBhYww4igGY1yczPOr2iqowUhNT0A6jp3LUfW0XjfpL2lvW2S32EC fk3XdmUj/Kp6ZdfVq3uE+I8mS2Js9ZaNoDANXr817vto6TLlc+RuaDAp6RsaSuGaT/JY jAwMfX1tDg3uJyP+vQ8tKHH5hpJ3wnYBrZarQUAgh4zX4UDNLgXzfEpuFcTGHpeDFS73 8z4UGsemt4Zle+rsiWgQLLYZFQvpTSP+dkT9iiS7odrzZloK2fpYfLELNdXj4cAl4cU0 npovqKMlg5ib9tDGmRnNkYpM08Nck4wki/MChmSpkhDQUiUlT9zptbHsybg3ubA7NXpV 0Dyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aV5Msxey; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si9211312ejr.281.2019.09.10.04.13.45; Tue, 10 Sep 2019 04:14:10 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aV5Msxey; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404087AbfIJHHQ (ORCPT + 99 others); Tue, 10 Sep 2019 03:07:16 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39466 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbfIJHHP (ORCPT ); Tue, 10 Sep 2019 03:07:15 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8A773kY063473; Tue, 10 Sep 2019 02:07:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568099223; bh=qhrJHNazfc5CMwtBCfE9AmHbBpmQjdMCtB10M++D6ZI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=aV5MsxeyOwzwuZre588rIVKEGGzYc0ka2baZHICXVKLIOPQ85G4qlEBnlMU9/6aq/ QWLgTsFdP5pvBhU4DDK+fl1lFQb/bNpW77FzDyhCS66xccgugv/apXAeh1XkKaeRA6 5L+806zvG7l2Kb7IKCSvyZDZbZTvjv6TKV9eZRD4= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8A7735E059383 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 10 Sep 2019 02:07:03 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 10 Sep 2019 02:07:03 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 10 Sep 2019 02:07:03 -0500 Received: from [10.250.98.116] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8A76xLj100346; Tue, 10 Sep 2019 02:07:00 -0500 Subject: Re: [PATCH v2 06/14] dmaengine: ti: Add cppi5 header for UDMA To: Peter Ujfalusi , Vinod Koul CC: , , , , , , , , , , , References: <20190730093450.12664-1-peter.ujfalusi@ti.com> <20190730093450.12664-7-peter.ujfalusi@ti.com> <20190908142528.GP2672@vkoul-mobl> <8699f999-7834-a083-2c7b-3ea909b1e011@ti.com> From: Grygorii Strashko Message-ID: <8486fbb1-9d2c-9230-6205-85d58b93697c@ti.com> Date: Tue, 10 Sep 2019 10:06:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <8699f999-7834-a083-2c7b-3ea909b1e011@ti.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/2019 13:59, Peter Ujfalusi wrote: > > > On 08/09/2019 17.25, Vinod Koul wrote: >> On 30-07-19, 12:34, Peter Ujfalusi wrote: >> >>> +/** >>> + * Descriptor header, present in all types of descriptors >>> + */ >>> +struct cppi5_desc_hdr_t { >>> + u32 pkt_info0; /* Packet info word 0 (n/a in Buffer desc) */ >>> + u32 pkt_info1; /* Packet info word 1 (n/a in Buffer desc) */ >>> + u32 pkt_info2; /* Packet info word 2 Buffer reclamation info */ >>> + u32 src_dst_tag; /* Packet info word 3 (n/a in Buffer desc) */ >> >> Can we move these comments to kernel-doc style please > > Sure, I'll move all struct and enums. > >>> +/** >>> + * cppi5_desc_get_type - get descriptor type >>> + * @desc_hdr: packet descriptor/TR header >>> + * >>> + * Returns descriptor type: >>> + * CPPI5_INFO0_DESC_TYPE_VAL_HOST >>> + * CPPI5_INFO0_DESC_TYPE_VAL_MONO >>> + * CPPI5_INFO0_DESC_TYPE_VAL_TR >>> + */ >>> +static inline u32 cppi5_desc_get_type(struct cppi5_desc_hdr_t *desc_hdr) >>> +{ >>> + WARN_ON(!desc_hdr); >> >> why WARN_ON and not return error! > > these helpers were intended to be as simple as possible. > I can go through with all of the WARN_ONs and replace them with if() > pr_warn() and either just return or return with 0. > > Would that be acceptable? > This should never happens in working system unless there is buggy code. I think It can be just removed -- Best regards, grygorii