Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp616224pxx; Mon, 26 Oct 2020 17:01:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMx8pjz8P38dyDw6xJbJN8Lqfmh37Lfbj3aTy6A9+5OsqAEWk6jR8yMObxfT3aLCGbbgS1 X-Received: by 2002:a50:f097:: with SMTP id v23mr17526635edl.347.1603756901423; Mon, 26 Oct 2020 17:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603756901; cv=none; d=google.com; s=arc-20160816; b=T4PAvLRVv4OBbNYIzvyF2CAeuUc9+JT+OMZosHswJLjYjop2Ha6ALZy9UI6oH2vtTp Kl8ESuu2qALLGPrvz/BKYACXZPrmpW/LKwvCoVC9hwTEyVp/CwQlA43KRpxIFLK05slW IPoQMxsmkf2L1OaHR+pukLuq0oUIJfzabmtwtc6vUu0MDlQip7XcBnhhjfH+8nMvoRuR 8+t/7g2MuyJMpykUOX1gdoetnTh1nYyxg8gLJAcpmn9elRMqdksfo9rGrNLrP++/rAjb jU2ERCrXPsddNIY5XfT2Di0sEf99aIFJ8IlkYfDjVjI+eTatAe5ehW/hGeC0Zo5akPaQ HDJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wG7L6k5elcsFTdFccbEBRu2CRJAFTSnK/nWIQ/2axqk=; b=lsiPZzeC7NFiJ7LuqlN6ITlUd0esZhUpikU1pp2vAFjv1SIOy2VYBerswxgFWrMWiE CIVrJsqS5LaDDvInF9Dy+/AkNRS03gWRnPxrz3IApkeffGeqGW6yMWtjwT+491Rh68T3 hbKnHngc483DNNmI7uqorL9oHfIMjlvejJZ2t2CK5NNK8JIZEy88BDLN2Fa4iwXPDFtI qsMrUVtfDACYvA5KFI4OHHQIl1hrtyrJMdId5TSb30UnRA8dukY4rJiF9Vue6WQ19drP 9gR7iznBordrpXenHVbViJQDHV9fWkBzUyY4Gwf9IVE0+h/4FD/ToLIwzz6qFmWxg1LP jNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BKECFo7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si6513772edz.568.2020.10.26.17.01.19; Mon, 26 Oct 2020 17:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BKECFo7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725880AbgJZU0Y (ORCPT + 99 others); Mon, 26 Oct 2020 16:26:24 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35451 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbgJZU0X (ORCPT ); Mon, 26 Oct 2020 16:26:23 -0400 Received: by mail-wm1-f67.google.com with SMTP id h22so2722802wmb.0; Mon, 26 Oct 2020 13:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wG7L6k5elcsFTdFccbEBRu2CRJAFTSnK/nWIQ/2axqk=; b=BKECFo7tWE7Uuvp/xZqDhJgyFDbg2DxsWPatrwsbVJunmqPCOfdlzPpJr7PFvAU59T 1l8TW/dvZDoT/EMS5HEVm0w/hmlxD0X25Y7Fb2GcdVKHabbnUyzgpdfW9U0NrY+IUDVo f4C2Mx0Bo1kRbDPSqShjfpQgRPyw/hPtUbujYoelq6NkSpfi2jodFHjlWK+2pCQrRLPz DIURbjgERLBPaSTEGh5Dv/YLP7Cv7wvoIUnBrLClrehtMBBQWY8BXx3a/uaDhYntUzwd VS5Fe43ZVtd4YfsGE6o+wuUpXrw2duyXRB5va0KqPn4cM/uw2SA4Ptx5P/jtKAe9Fs4j EFTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wG7L6k5elcsFTdFccbEBRu2CRJAFTSnK/nWIQ/2axqk=; b=Mq1Ypg4nh6R/uvdQavlzh2lANzW4BvRBzVwjzovnyjjHqJyHvhTNFAc7DxBRXJU7Zn rzrMScDpM98NOc/ibRv7pw04QnohoN9bf6Zp8jDpLCq50OL4o8PyghIu5mhNh4RDl5fG g/7oaZuRYNNIuZmZAXwF9eAYdY9lks55+IuRVyKxmkDv6oC1wbQIOG0uzC+G8c0jlDBS JhoxBOAz3hy+moeiJwkiHbhRSUpuwy7AM7NgIr9oRLt4uitZ9oQYshG/GyG/fgFm67la /WNUpPNU2vBGtNBAyxen9aA9hz+qXRkfKcB1hiFZAGWJpyOWxCVF0LZ3kIBukKSS3MWb vXsw== X-Gm-Message-State: AOAM531b3opdEPhEBOYlzOQz13VzvFtUktqWs8UrFRWF8V/Z5r+pQPVb G5+voL86rwjuTi3jvyHhoj9USisn9nLz+wnjEGc= X-Received: by 2002:a1c:6302:: with SMTP id x2mr18103079wmb.56.1603743981925; Mon, 26 Oct 2020 13:26:21 -0700 (PDT) MIME-Version: 1.0 References: <20201026181242.76bf3b6gx2yx7hr7@adolin> In-Reply-To: <20201026181242.76bf3b6gx2yx7hr7@adolin> From: Alex Deucher Date: Mon, 26 Oct 2020 16:26:10 -0400 Message-ID: Subject: Re: [Outreachy][PATCH] drm/amdgpu: use true and false for bool initialisations To: Sumera Priyadarsini Cc: Maling list - DRI developers , Dave Airlie , "Kuehling, Felix" , LKML , amd-gfx list , Sumit Semwal , Melissa Wen , outreachy-kernel@googlegroups.com, Daniel Vetter , "Deucher, Alexander" , Christian Koenig , linux-media Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Oct 26, 2020 at 2:14 PM Sumera Priyadarsini wrote: > > Bool initialisation should use 'true' and 'false' values instead of 0 > and 1. > > Modify amdgpu_amdkfd_gpuvm.c to initialise variable is_imported > to false instead of 0. > > Issue found with Coccinelle. > > Signed-off-by: Sumera Priyadarsini > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > index 64d4b5ff95d6..ba4bd06bfcc5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > @@ -1288,7 +1288,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu( > struct ttm_validate_buffer *bo_list_entry; > unsigned int mapped_to_gpu_memory; > int ret; > - bool is_imported = 0; > + bool is_imported = false; > > mutex_lock(&mem->lock); > mapped_to_gpu_memory = mem->mapped_to_gpu_memory; > -- > 2.25.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx