From owner-svn-src-all@FreeBSD.ORG Fri Dec 13 22:11:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FFD5AA0 for ; Fri, 13 Dec 2013 22:11:27 +0000 (UTC) Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B85BE12BC for ; Fri, 13 Dec 2013 22:11:26 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id b15so1128519eek.24 for ; Fri, 13 Dec 2013 14:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to:cc :message-id; bh=7fs/zRRESkn1VuT3YP+pcixHx2+VcTXfMjkINF1dBkI=; b=Ef4iIzZE/7jZmD16ViEoXCCNNSAtKTctylRePgunokDh7vl/BDB1U0DQBoThs5wPXo pAYDFInQa21WzdaiqW7TTitohqTv2jduLXdEfIxJ1o/QYgpbNbnel3RjdRItSdXcsqfX 0TkknLWA6EzFuypqz794dE/iGzV+47OGWmRE9qws85v6MZp8EKB9QVpFx8wYOZUZ7377 hgJm8SNjBnU0vl5OKoQ/6itVRXKOxwzV84Y5OQnCXYt79T2IlH6CUj3o1lUdIkUY/vNs by4MJ6ZLAqCbp96dS/3AmnKmKWkN1tZEWbx+nv2tSbdavXx+BiOXLke98xn04O7uV61e mH0A== X-Gm-Message-State: ALoCoQlcgBkxof7yZJdy3QBh/J4ChTKCJlXzpqaWn6RhlQOlNvzqxDviqhkKmp9kH+RfLA9PIAN3 X-Received: by 10.14.204.135 with SMTP id h7mr5092385eeo.104.1386972679221; Fri, 13 Dec 2013 14:11:19 -0800 (PST) Received: from [46.96.136.173] ([46.96.136.173]) by mx.google.com with ESMTPSA id v1sm11452290eef.9.2013.12.13.14.11.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:11:18 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <20131212190230.GU59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r259261 - head/sys/dev/drm2 From: Aleksandr Rybalko Date: Sat, 14 Dec 2013 00:11:01 +0200 To: Konstantin Belousov , Aleksandr Rybalko Message-ID: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 22:11:27 -0000 Konstantin Belousov написав(ла): >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: >> Author: ray >> Date: Thu Dec 12 14:49:26 2013 >> New Revision: 259261 >> URL: http://svnweb.freebsd.org/changeset/base/259261 >> >> Log: >> Do not try to probe/attach if attempt to add fbd child are failed. >> >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/sys/dev/drm2/drm_fb_helper.c >> >> Modified: head/sys/dev/drm2/drm_fb_helper.c >> >============================================================================== >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 >2013 (r259260) >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 >2013 (r259261) >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct >> >> kdev = fb_helper->dev->device; >> fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); >> - ret = device_probe_and_attach(fbd); >> + if (fbd != NULL) >> + ret = device_probe_and_attach(fbd); >> + else >> + ret = ENODEV; >This must be -ENODEV, since linux layer operates on negative values for >error. The error is negated in the drm layer, which would result in >non-existent errno returned to FreeBSD code. It is not actually return code, but only value to show in error message few lines later. ENODEV just value for case no device attached. That error message appear only if kernel configuration include device vt. (planning for syscons too, maybe). > >Also, the #ifdef __FreeBSD braces in the file are not useful, please >remove them. >> #ifdef DEV_VT >> if (ret != 0) >> DRM_ERROR("Failed to attach fbd device: %d\n", ret); Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over whole DRM2 code, to reduce differences with linux code? Thanks! WBW ------ Aleksandr Rybalko