From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754787AbdJITbb (ORCPT ); Mon, 9 Oct 2017 15:31:31 -0400 Received: from mail-qt0-f170.google.com ([209.85.216.170]:43944 "EHLO mail-qt0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754049AbdJITb3 (ORCPT ); Mon, 9 Oct 2017 15:31:29 -0400 X-Google-Smtp-Source: AOwi7QAt5OZ2cO6R12t1Gfj6+butum23Qp1CGSsnznspYH/C92wPuG5dzVdIadZ/xtIUxPeq32JSVdmLZwwpcljXMr4= MIME-Version: 1.0 In-Reply-To: <20171009085957.nwfree4igdhiqtuf@phenom.ffwll.local> References: <20171008140407.13927-1-harshasharmaiitr@gmail.com> <150747381515.24532.16488907175098177864@mail.alporthouse.com> <20171009085957.nwfree4igdhiqtuf@phenom.ffwll.local> From: Sean Paul Date: Mon, 9 Oct 2017 15:31:06 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() To: Chris Wilson , Harsha Sharma , Sean Paul , Jani Nikula , outreachy-kernel , Intel Graphics Development , dri-devel , Linux Kernel Mailing List Cc: Daniel Vetter Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 9, 2017 at 4:59 AM, Daniel Vetter wrote: > On Sun, Oct 08, 2017 at 03:43:35PM +0100, Chris Wilson wrote: >> Quoting Harsha Sharma (2017-10-08 15:04:07) >> > @@ -624,7 +624,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, >> > ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; >> > ifbdev->fb = fb; >> > >> > - drm_framebuffer_reference(&ifbdev->fb->base); >> > + drm_framebuffer_put(&ifbdev->fb->base); >> >> Whoops. > > Hm yeah, how did this happen? Does cocci really do this, or is that an > accident from manually fixing stuff up? Running the spatch from the commit message gives me the correct substitution: @@ -627,7 +627,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; ifbdev->fb = fb; - drm_framebuffer_reference(&ifbdev->fb->base); + drm_framebuffer_get(&ifbdev->fb->base); /* Final pass to check if any active pipes don't have fbs */ for_each_crtc(dev, crtc) { Probably just finger slip since this is the last chunk before the omitted selftests changes. Harsha: the "better" way to omit the selftests without hand tuning the patch would be to run the cocci spatch on i915 as normal, and then run "git checkout -- drivers/gpu/drm/i915/selftests/" before committing. It's dangerous to edit patches by hand, or to misrepresent a patch as being the result of a cocci spatch when it's not. Sean > -Daniel > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch