All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Lourdes Pedrajas <lu@pplo.net>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
	julia.lawall@inria.fr
Subject: Re: [Outreachy kernel] [PATCH v2] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk()
Date: Wed, 11 Mar 2020 12:22:53 +0100	[thread overview]
Message-ID: <20200311122253.7b57cb73@elisabeth> (raw)
In-Reply-To: <20200310222844.GC2925@supernova>

On Tue, 10 Mar 2020 23:28:44 +0100
Lourdes Pedrajas <lu@pplo.net> wrote:

> Indeed, also found dev_warn and dev_printk functions, but they are
> similar, they expect a pointer to a network device.

Careful, those expect a more generic "struct device" instead, not a
network device: a "struct net_device" embeds a "struct device".

About the representation of a "device", you can have a look at LDD3,
chapter 14, page 381 (note: the book might be outdated, especially
API-wise, but for general concepts I find it's still very actual):
	https://lwn.net/Kernel/LDD3/

a struct net_device is a complicated, horrible beast. Chapter 17 in
LDD3 has some notes, but a quick look at:
	https://www.kernel.org/doc/htmldocs/networking/API-struct-net-device.html

should be enough to give you an idea. You don't need to understand all
the details now, of course!

-- 
Stefano



  reply	other threads:[~2020-03-11 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 21:26 [PATCH v2] staging: rtl8192u: r8192U_wx: use netdev_warn() instead of printk() Lourdes Pedrajas
2020-03-10 21:40 ` [Outreachy kernel] " Julia Lawall
2020-03-10 21:43 ` Stefano Brivio
2020-03-10 22:10   ` Lourdes Pedrajas
2020-03-10 22:15     ` Stefano Brivio
2020-03-10 22:28       ` Lourdes Pedrajas
2020-03-11 11:22         ` Stefano Brivio [this message]
2020-03-11 18:15           ` Lourdes Pedrajas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200311122253.7b57cb73@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=lu@pplo.net \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.