Re: [PATCH v6 01/11] kconfig: Add PicoSAT interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2024 at 04:49:39AM +0100, Ole Schuerks wrote:
> PicoSAT (https://fmv.jku.at/picosat/) is the SAT solver used in this

PicoSAT [0] ... etc etc..

Then at the bottom you use the tag:

Link: https://fmv.jku.at/picosat/ # [0]

> project. It is used as a dynamically loaded library. 

OK

> This commit contains a

Obviously this commit exits... be more imperative...

> script that installs PicoSAT as a library on the host system, a source file
> that provides a function for loading a subset of functions from the
> library, and a header file that declares these functions.

Just say something like:

Add PicoSAT dynamic library support to kconfig. Support for this will be
used subsequent patches.

> +static void load_function(const char *name, void **ptr, void *handle, bool *failed)
> +{
> +	if (*failed)
> +		return;
> +
> +	*ptr = dlsym(handle, name);
> +	if (!*ptr) {
> +		printd("While loading %s: %s\n", name, dlerror());
> +		*failed = true;
> +	}
> +}
> +
> +bool load_picosat(void)
> +{
> +	void *handle = NULL;
> +	bool failed = false;
> +
> +	/*
> +	 * Try different names for the .so library. This is necessary since
> +	 * all packages don't use the same versioning.
> +	 */
> +	for (int i = 0; i < ARRAY_SIZE(picosat_lib_names) && !handle; ++i)
> +		handle = dlopen(picosat_lib_names[i], RTLD_LAZY);
> +	if (!handle) {

This just deals with the first error and there is no unwinding, is that OK?

Other than that, did you run this through checkpatch.pl?

 Luis




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux