kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* drivers/char/efirtc.c - efi_rtc_open\ efi_rtc_close
@ 2019-01-21 10:10 Muni Sekhar
  2019-01-21 10:28 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Muni Sekhar @ 2019-01-21 10:10 UTC (permalink / raw)
  To: kernelnewbies; +Cc: Greg KH, arnd


[-- Attachment #1.1: Type: text/plain, Size: 526 bytes --]

Hello All,

The drivers/char/efirtc.c file has ‘struct file_operations.open’ & ‘struct
file_operations.close’ functions efi_rtc_open()\ efi_rtc_close() does
nothing, just returns ‘0’.

So it accept multiple open files at the same time. If we don’t define these
empty function, still driver accepts multiple open() calls at the same
time, right?

If so I’d like to know what is the advantage of keeping these function
which does nothing instead of removing it from driver?


-- 
Thanks,
Sekhar

[-- Attachment #1.2: Type: text/html, Size: 805 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: drivers/char/efirtc.c - efi_rtc_open\ efi_rtc_close
  2019-01-21 10:10 drivers/char/efirtc.c - efi_rtc_open\ efi_rtc_close Muni Sekhar
@ 2019-01-21 10:28 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2019-01-21 10:28 UTC (permalink / raw)
  To: Muni Sekhar; +Cc: arnd, kernelnewbies

On Mon, Jan 21, 2019 at 03:40:31PM +0530, Muni Sekhar wrote:
> Hello All,
> 
> The drivers/char/efirtc.c file has ‘struct file_operations.open’ & ‘struct
> file_operations.close’ functions efi_rtc_open()\ efi_rtc_close() does
> nothing, just returns ‘0’.
> 
> So it accept multiple open files at the same time. If we don’t define these
> empty function, still driver accepts multiple open() calls at the same
> time, right?
> 
> If so I’d like to know what is the advantage of keeping these function
> which does nothing instead of removing it from driver?

There is no advantage at all, those functions can be removed safely, no
need to have them at all.  Care to send a patch for this?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-21 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 10:10 drivers/char/efirtc.c - efi_rtc_open\ efi_rtc_close Muni Sekhar
2019-01-21 10:28 ` Greg KH

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).