linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hunold <hunold@convergence.de>
To: Greg KH <greg@kroah.com>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card
Date: Wed, 16 Jul 2003 09:41:45 +0200	[thread overview]
Message-ID: <3F1501B9.8010603@convergence.de> (raw)
In-Reply-To: <20030716012841.GA2017@kroah.com>

Hello Greg KH,

thanks for reviewing these patches.

>>+
>>+/////////////////////////////////////////////////////////////////////
>>+//              register functions
>>+/////////////////////////////////////////////////////////////////////
>>+
>>+void WriteRegDW(struct adapter *adapter, u32 reg, u32 value)
> 
> 
> Hm, this really isn't the proper Linux coding style.  Please read
> Documentation/CodingStyle on how to name functions.

Yes, I know. The code was imported from an external source, and the code 
was kept mostly unchanged to keep syncing easier.

But with all the problems you mentioned, I'm now going to review the 
code. I'll send an updated patch later.

>>+{
>>+	u32 flags;
> 
> 
> flags has to be a unsigned long.

Yes.

> 
> 
>>+
>>+	save_flags(flags);
>>+	cli();
> 
> 
> Huh?  Did you even compile this on a SMP kernel on 2.5?  (Hint, it will
> not...)  Please fix this up.

OMG. I'm sorry for having submitted something like this. It was not 
tested by me, no. I'll fix it and test compiling for SMP.

> 
> 
>>+u32 ReadRegDW(struct adapter *adapter, u32 reg)
>>+{
>>+	return readl(adapter->io_mem + reg);
>>+}
> 
> 
> Why?  Why not just write the readl() function whereever you call
> ReadRegDW?

I don't want to defend the original author, but perhaps these functions 
were copy&pasted from a Windoze driver.

>>+/////////////////////////////////////////////////////////////////////
>>+//                      I2C
>>+////////////////////////////////////////////////////////////////////
>>+
>>+u32 i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf, u32 retries)
> 
> 
> kernel functions traditionally return an int.  A negative number if
> there is an error, and 0 if there isn't.

I'll review it.

> Oh, any reason for not tying this to the existing i2c core?
> Or is that done somewhere else?

No.  I2C is used by all devices at least to access the different 
chipsets that make up the tuning.

In former times, the project had a hard time getting tuning to work in a 
reliable way, because some of these chipsets are particularly picky when 
it comes to timing and expect messages in a fixed form. Especially 
probing of other i2c devices was a problem, which locked up the i2c bus 
often.

I know that an class field for i2c adapters exists now and that i2c 
clients can check if they want to probe that bus at all now.

The DVB core is quite self contained and we decided to copy the i2c 
functionality needed for our purposes. So we ended up in using about 100 
lines of code instead of the whole i2c core.

Now that you have finished improving the i2c core, perhaps we can switch 
back to the kernel i2c system at a later time.

> thanks,
> 
> greg k-h

CU
Michael.


  reply	other threads:[~2003-07-16  7:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15 12:20 [PATCH 1/17] Update the saa7146 driver core Michael Hunold
2003-07-15 12:20 ` [PATCH 2/17] Various small fixes in dvb-core Michael Hunold
2003-07-15 12:20   ` [PATCH 3/17] Major dvb net code cleanup, many fixes Michael Hunold
2003-07-15 12:20     ` [PATCH 4/17] Update dvb frontend drivers Michael Hunold
2003-07-15 12:20       ` [PATCH 5/17] Add Zarlink MT312 DVB-T frontend driver Michael Hunold
2003-07-15 12:20         ` [PATCH 6/17] Update the DVB budget drivers Michael Hunold
2003-07-15 12:20           ` [PATCH 7/17] Update the DVB av7110 driver Michael Hunold
2003-07-15 12:20             ` [PATCH 8/17] Update firmware of " Michael Hunold
2003-07-15 12:20               ` [PATCH 9/17] More saa7146 driver core updates Michael Hunold
2003-07-15 12:20                 ` [PATCH 10/17] Various kconfig and Makefile updates Michael Hunold
2003-07-15 12:20                   ` [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card Michael Hunold
2003-07-15 12:20                     ` [PATCH 12/17] Add two drivers for Hexium frame grabber cards Michael Hunold
2003-07-15 12:20                       ` [PATCH 13/17] More updates for the dvb core Michael Hunold
2003-07-15 12:20                         ` [PATCH 14/17] Add TDA14500x DVB-T frontend driver Michael Hunold
2003-07-15 12:21                           ` [PATCH 15/17] Update various other frontend drivers Michael Hunold
2003-07-15 12:21                             ` [PATCH 16/17] Update the av7110 DVB driver Michael Hunold
2003-07-16  1:28                     ` [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card Greg KH
2003-07-16  7:41                       ` Michael Hunold [this message]
2003-07-16 16:37                         ` Greg KH

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=3F1501B9.8010603@convergence.de \
    --to=hunold@convergence.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).