From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3225AA0599; Fri, 10 Apr 2020 04:59:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C1761D44E; Fri, 10 Apr 2020 04:59:12 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 600401D449 for ; Fri, 10 Apr 2020 04:59:11 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id h25so635196lja.10 for ; Thu, 09 Apr 2020 19:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i0xjBVYlIzVH+gwJ2C+XDg5hyQG+w7Va8hYcKc+/0bo=; b=p92wefxziotAy4KjcKHP1VW0TkC3rUoNRYbrewt6yz66V5BLdyOVCHyd1MsUcA2rkh zd0mEf1ps0oBLlU2jDx6QkHKTvfBG30/UeGabNtnbMWnaX14gqriGhVvf7bAEwssObuo A5QjCfqvDalCwC+K6FLVWEm6z6X9czVpuCPRYVaedvHCT6HJZdaHw/4GOqdNdSE1D5QZ jhOfAnFh4pE9n8mQ0gby+mRlGfdm+BmEaowHwZTQ2gvlK98+yFOuZ9MIqnPGfvulfDzM 7XXqYCJTxLl4HcQlCObgElnNHjgKmHeoO5mgEZv3xtP1Ol/dxwraTwRuU7vkmxM1Oiep SpeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i0xjBVYlIzVH+gwJ2C+XDg5hyQG+w7Va8hYcKc+/0bo=; b=gd851hw+O7Y0jH3YomcXKiIsYJT78vQF0B5zz8N9SBku/wYZc52XZHXFpl+IcigKcV 097/JCp+i2aSv339YrJ7y+AWNGwTd49R6LO/UFBwLJyx2IhCP5wwww9xRjsVR6wTjGM7 Ynwc2gmCgOTbXCA13DtiWjePLXmpUEo5C2N4sGhLflv3AMWqhd8vwY/5me5oskha767F ZC7dTQtYH0MpK5Qil8w+sdT8C99eMWD4L2IMPj2WW1PErk4wYfB5vC6Mzf+BoQx16r7e FJTQosDHU3/l70LJ4anAww9L/9awKhnEnF8aTdw6fA2bQE7R/5elZz8LquPSol6K9wtd eqEg== X-Gm-Message-State: AGi0PuZ7jsl9unam9MpwJ3wCPa2t+GcYBWq4tgKZOaG3HX8gFj6MxDsb OGSkSe3iLvBWH9GDduLBC1s= X-Google-Smtp-Source: APiQypK8TiTz38jjrKcQZHJzgX9HM5dK2E0a8GHG+jpdqyOsMZRKawjN0pUQZ7VG31DNIuWM1OiETw== X-Received: by 2002:a2e:8648:: with SMTP id i8mr1667536ljj.188.1586487550834; Thu, 09 Apr 2020 19:59:10 -0700 (PDT) Received: from Sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id c22sm280779ljh.66.2020.04.09.19.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 19:59:10 -0700 (PDT) Date: Fri, 10 Apr 2020 05:59:09 +0300 From: Dmitry Kozlyuk To: Ranjit Menon Cc: dev@dpdk.org, "Dmitry Malloy (MESHCHANINOV)" , Narcisa Ana Maria Vasile Message-ID: <20200410055909.1889b794@Sovereign> In-Reply-To: <20200410055010.6d2b5592@Sovereign> References: <20200330041026.784624-1-dmitry.kozliuk@gmail.com> <20200330041026.784624-2-dmitry.kozliuk@gmail.com> <20200410055010.6d2b5592@Sovereign> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/1] virt2phys: virtual to physical address translator for Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > > > > + PHYSICAL_ADDRESS *phys; > > > + size_t size; > > > + NTSTATUS status; > > > + > [snip] > > > + > > > + status = WdfRequestRetrieveOutputBuffer( > > > + request, sizeof(*phys), &phys, &size); > > > > Better to put a (PVOID *)typecast for &phys here: > > status = WdfRequestRetrieveOutputBuffer( > > request, sizeof(*phys), (PVOID *)&phys, &size); > > What do you mean? Without a typecast the built-in static analyzer emits a > warning (and all warnings are treated as errors for a driver): > > virt2phys.c(108,46): error C2220: the following warning is treated as an error > virt2phys.c(108,46): warning C4047: 'function': 'PVOID *' differs in levels of indirection from 'PVOID **' > virt2phys.c(108,46): warning C4022: 'WdfRequestRetrieveInputBuffer': pointer mismatch for actual parameter 3 > Never mind, I thought you were referring to the existing typecast in WdfRequestRetrieveInputBuffer(). Thanks for the suggestion, will add in v2. -- Dmitry Kozlyuk