From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751671AbeEPSb7 (ORCPT ); Wed, 16 May 2018 14:31:59 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35520 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbeEPSb5 (ORCPT ); Wed, 16 May 2018 14:31:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2889E602BA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=timur@codeaurora.org Subject: Re: [RFC PATCH] efi/fb: Convert PCI bus address to resource if translated by the bridge To: Sinan Kaya , linux-pci@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Jones , Bartlomiej Zolnierkiewicz , "open list:EFIFB FRAMEBUFFER DRIVER" , "open list:FRAMEBUFFER LAYER" , open list References: <1526495029-25783-1-git-send-email-okaya@codeaurora.org> From: Timur Tabi Message-ID: <3120434b-9831-bf33-25b8-11aba1c1b648@codeaurora.org> Date: Wed, 16 May 2018 13:31:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1526495029-25783-1-git-send-email-okaya@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/16/2018 01:23 PM, Sinan Kaya wrote: > + win_start = window->res->start - window->offset; Can you guarantee that window->res->start is always >= window->offset? > + win_size = window->res->end - window->res->start + 1; Use resource_size() instead. -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.